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

Iñaki Baz Castillo ibc at aliax.net
Wed Jul 28 22:18:30 CEST 2010


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?




-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the sr-dev mailing list