Max Log Files

View: New views
7 Messages — Rating Filter:   Alert me  

Max Log Files

by Alejandro Guerrieri-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

log.c, line 104:

#define MAX_LOGFILES 128

Is there any reason why this number is so low? After adding about 30  
smsc connections, I've started getting "Too many log files already  
open, not adding XXXXX" errors. This is probably because the  
connections use more than one file descriptor, or maybe the counter  
doesn't get reset after rotating logs or something?

Regards,

--
Alejandro Guerrieri
aguerrieri@...





Re: Max Log Files

by Nikos Balkanas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

The counter should not be affected by gwlib/log.c: log_reopen(). All openned
files are closed and then openned without changing num_logfiles.

However, this would be an excellent place to do some debugging. You print
logfiles[i].filename from there. This way when you have the problem you
could check for anything suspicious by sending a kill -HUP.

BR,
Nikos
----- Original Message -----
From: "Alejandro Guerrieri" <aguerrieri@...>
To: "Kannel Devel" <devel@...>
Sent: Friday, November 06, 2009 10:17 PM
Subject: Max Log Files


> log.c, line 104:
>
> #define MAX_LOGFILES 128
>
> Is there any reason why this number is so low? After adding about 30  smsc
> connections, I've started getting "Too many log files already  open, not
> adding XXXXX" errors. This is probably because the  connections use more
> than one file descriptor, or maybe the counter  doesn't get reset after
> rotating logs or something?
>
> Regards,
>
> --
> Alejandro Guerrieri
> aguerrieri@...
>
>
>
>



Re: Max Log Files

by Alexander Malysh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

this is only for performance reasons. But IMHO 128 log files are too  
many  for one instance :)

Thanks,
Alexander Malysh

Am 06.11.2009 um 21:17 schrieb Alejandro Guerrieri:

> log.c, line 104:
>
> #define MAX_LOGFILES 128
>
> Is there any reason why this number is so low? After adding about 30  
> smsc connections, I've started getting "Too many log files already  
> open, not adding XXXXX" errors. This is probably because the  
> connections use more than one file descriptor, or maybe the counter  
> doesn't get reset after rotating logs or something?
>
> Regards,
>
> --
> Alejandro Guerrieri
> aguerrieri@...
>
>
>
>



Re: Max Log Files

by Alejandro Guerrieri-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What would happen if you open many smsc binds to the same log file?  
Would those count as separate log files despite being written to the  
same file?

Regards,
--
Alejandro Guerrieri
aguerrieri@...



On 09/11/2009, at 10:45, Alexander Malysh wrote:

> Hi,
>
> this is only for performance reasons. But IMHO 128 log files are too  
> many  for one instance :)
>
> Thanks,
> Alexander Malysh
>
> Am 06.11.2009 um 21:17 schrieb Alejandro Guerrieri:
>
>> log.c, line 104:
>>
>> #define MAX_LOGFILES 128
>>
>> Is there any reason why this number is so low? After adding about  
>> 30 smsc connections, I've started getting "Too many log files  
>> already open, not adding XXXXX" errors. This is probably because  
>> the connections use more than one file descriptor, or maybe the  
>> counter doesn't get reset after rotating logs or something?
>>
>> Regards,
>>
>> --
>> Alejandro Guerrieri
>> aguerrieri@...
>>
>>
>>
>>
>



Re: Max Log Files

by Alexander Malysh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Am 09.11.2009 um 11:23 schrieb Alejandro Guerrieri:

> What would happen if you open many smsc binds to the same log file?  
> Would those count as separate log files despite being written to the  
> same file?

yes they will count as separate log files because each log file may  
have different log level defined...

>
> Regards,
> --
> Alejandro Guerrieri
> aguerrieri@...
>
>
>
> On 09/11/2009, at 10:45, Alexander Malysh wrote:
>
>> Hi,
>>
>> this is only for performance reasons. But IMHO 128 log files are  
>> too many  for one instance :)
>>
>> Thanks,
>> Alexander Malysh
>>
>> Am 06.11.2009 um 21:17 schrieb Alejandro Guerrieri:
>>
>>> log.c, line 104:
>>>
>>> #define MAX_LOGFILES 128
>>>
>>> Is there any reason why this number is so low? After adding about  
>>> 30 smsc connections, I've started getting "Too many log files  
>>> already open, not adding XXXXX" errors. This is probably because  
>>> the connections use more than one file descriptor, or maybe the  
>>> counter doesn't get reset after rotating logs or something?
>>>
>>> Regards,
>>>
>>> --
>>> Alejandro Guerrieri
>>> aguerrieri@...
>>>
>>>
>>>
>>>
>>
>



Re: Max Log Files

by Alejandro Guerrieri-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, that explains it, then :)

PS: When you have a minute (or 15 ;)), could you please review the two  
patches I've sent last week for meta-data on dlrs and independent dlr  
counters?

Regards,
--
Alejandro Guerrieri
aguerrieri@...



On 09/11/2009, at 11:25, Alexander Malysh wrote:

>
> Am 09.11.2009 um 11:23 schrieb Alejandro Guerrieri:
>
>> What would happen if you open many smsc binds to the same log file?  
>> Would those count as separate log files despite being written to  
>> the same file?
>
> yes they will count as separate log files because each log file may  
> have different log level defined...
>
>>
>> Regards,
>> --
>> Alejandro Guerrieri
>> aguerrieri@...
>>
>>
>>
>> On 09/11/2009, at 10:45, Alexander Malysh wrote:
>>
>>> Hi,
>>>
>>> this is only for performance reasons. But IMHO 128 log files are  
>>> too many  for one instance :)
>>>
>>> Thanks,
>>> Alexander Malysh
>>>
>>> Am 06.11.2009 um 21:17 schrieb Alejandro Guerrieri:
>>>
>>>> log.c, line 104:
>>>>
>>>> #define MAX_LOGFILES 128
>>>>
>>>> Is there any reason why this number is so low? After adding about  
>>>> 30 smsc connections, I've started getting "Too many log files  
>>>> already open, not adding XXXXX" errors. This is probably because  
>>>> the connections use more than one file descriptor, or maybe the  
>>>> counter doesn't get reset after rotating logs or something?
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Alejandro Guerrieri
>>>> aguerrieri@...
>>>>
>>>>
>>>>
>>>>
>>>
>>
>



Re: Max Log Files

by Alexander Malysh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi again,

sorry,  very busy today, will try review it tomorrow.

Thanks,
Alexander Malysh

Am 09.11.2009 um 14:41 schrieb Alejandro Guerrieri:

> Ok, that explains it, then :)
>
> PS: When you have a minute (or 15 ;)), could you please review the  
> two patches I've sent last week for meta-data on dlrs and  
> independent dlr counters?
>
> Regards,
> --
> Alejandro Guerrieri
> aguerrieri@...
>
>
>
> On 09/11/2009, at 11:25, Alexander Malysh wrote:
>
>>
>> Am 09.11.2009 um 11:23 schrieb Alejandro Guerrieri:
>>
>>> What would happen if you open many smsc binds to the same log  
>>> file? Would those count as separate log files despite being  
>>> written to the same file?
>>
>> yes they will count as separate log files because each log file may  
>> have different log level defined...
>>
>>>
>>> Regards,
>>> --
>>> Alejandro Guerrieri
>>> aguerrieri@...
>>>
>>>
>>>
>>> On 09/11/2009, at 10:45, Alexander Malysh wrote:
>>>
>>>> Hi,
>>>>
>>>> this is only for performance reasons. But IMHO 128 log files are  
>>>> too many  for one instance :)
>>>>
>>>> Thanks,
>>>> Alexander Malysh
>>>>
>>>> Am 06.11.2009 um 21:17 schrieb Alejandro Guerrieri:
>>>>
>>>>> log.c, line 104:
>>>>>
>>>>> #define MAX_LOGFILES 128
>>>>>
>>>>> Is there any reason why this number is so low? After adding  
>>>>> about 30 smsc connections, I've started getting "Too many log  
>>>>> files already open, not adding XXXXX" errors. This is probably  
>>>>> because the connections use more than one file descriptor, or  
>>>>> maybe the counter doesn't get reset after rotating logs or  
>>>>> something?
>>>>>
>>>>> Regards,
>>>>>
>>>>> --
>>>>> Alejandro Guerrieri
>>>>> aguerrieri@...
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>