[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nufw-devel] DOS mode, packet logging
From: |
Glen Ogilvie |
Subject: |
Re: [Nufw-devel] DOS mode, packet logging |
Date: |
Tue, 23 Mar 2010 16:43:15 +1300 (NZDT) |
----- "Glen Ogilvie" <address@hidden> wrote:
> Hi,
>
> I have noticed that on a couple of occasions problems with logging.
> I've seen messages like:
>
> nuauth[14187]: [7] No packet logging to avoid logger DOS
>
> appear in nuauth log. After this message, logging to the database for
> authenticated users
> stops, and does not seem to start again until nuauth is restarted.
> This breaks single sign on and traffic
> accounting.
>
> It looks to me like nuauth is supposed to switch back from DOS mode
> when the g_thread_pool_unprocessed(nuauthdatas->user_loggers) <
> nuauthconf->max_unassigned_messages
>
> called in: act_on_loggers_processing, which is called from the
> main_cleanup method in authsrv.c, which
> appears to me to be called by nuauth_main_loop using a timer.
>
> I am a little lost as to how the thread pool
> (nuauthdatas->user_loggers) empties itself. Do the user_loggers
> thread have a timeout that will cause them to be destroyed or retry if
> they failed to log correctly, say for example that the DB was busy?
>
> Any help around what I can do to:
> 1 - reduce the chance of packets not being logged
> 2 - get the system to come back out of DOS protection mode without a
> restart of nuauth would be appreciated.
> 3 - if this is a bug, then a patch to fix it would be good.
>
> The version I am looking at is: 2.2.21
Of further information to this, we are using the MySQL logging module,
compiled again mysql 5.0.67, and have mysql_request_timeout=5 in the
configuration file. This seems to happen during high load, and when
the database is fairly busy.
I've been looking at the source code for the mysql module.
I see MYSQL_OPT_CONNECT_TIMEOUT is set,
but MYSQL_OPT_WRITE_TIMEOUT and MYSQL_OPT_READ_TIMEOUT are
not set.
I don't know if this is related to my problem, but am wondering about it. See:
http://dev.mysql.com/doc/refman/5.1/en/mysql-options.html
Regards
Glen Ogilvie