httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Re: [users@httpd] Logging to a MySQL Database
Date Wed, 31 Oct 2007 20:41:05 GMT
On Wed, 31 Oct 2007 20:51:54 +0100
Samuel Vogel <> wrote:

> Hey guys,
> I am running Apache 2.2 and did try out mod_log_mysql to make my logs
> to to an mysql table. Unfortunately I do run apache in prefork mode
> and in peak times, there are arround 700 processes running.
> The bad thing is that mod_log_mysql makes a new mysql connection for 
> every single thread. This is not just causing a major mysql slowdown
> but also neither myisam nor innodb are able to handle the number of
> insters ( 3 million lines in about 12 hours ) from so man different
> clients and crash the table.

With prefork, 700 processes == 700 processes.  You've hit one of the
scalability limitations of the prefork model.

If you want to scale it, use a threaded MPM, and a logging module
that takes advantage of connection pooling.  There's no standard
module mod_log_dbd, but there might easily be a third-party one
somewhere: it's a simple enough module to write if you have some
time for it.

Nick Kew

Application Development with Apache - the Apache Modules Book

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message