[sr-dev] kamailio gets frozen when rsyslog-mysql cannot send the SQL query

Olle E. Johansson oej at edvina.net
Wed Jul 28 22:27:26 CEST 2010


28 jul 2010 kl. 22.18 skrev Iñaki Baz Castillo:

> 2010/7/28 Olle E. Johansson <oej at edvina.net>:
>>> Being a multiprocess blocking design it would be a bit difficult such
>>> solution. Perhaps the "ping syslog" mechanism I suggested in my
>>> initial mail :)
>> 
>> I thought it wasn't easy... But still, we need some sort of solution
>> since this can affect a lot of systems.
> 
> Let me suggest this proposal:
> 
> - Having a dedicated kamailio process to act as syslogger.
> 
> - Other kamailio processes send logging messages to such syslogger
> process by using a posix queue fifo which is non blocking. This means
> that kamailio workers would never wait for the "syslog()" call  to
> return.
> 
> - Posix mesage queues implement a configurable queue. But also, the
> syslogger process could manage its own queue (by using an array as a
> FIFO system) so messages received by the posix queue  would be
> inserted in the FIFO and extracted from there when they are logged to
> syslog.
> 
> - In this way, if syslog daemon gets frozen kamailio workers wouldn't
> realize of it. Some logs would be lost in case the FIFO gets full but
> this is not so important as getting Kamailio non processing SIP
> messages :)
> 
> Opinnions? Do you consider it feasible?

Other people are better judges of the architecture, but I do agree with the results.
We can accept syslog messages getting lost, as long as Kamailio keeps
running the SIP handling processes.

/O


More information about the sr-dev mailing list