Re: Logging to a MySQL Database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 31 Oct 2007 20:51:54 +0100
Samuel Vogel <samy-delux@xxxxxx> 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
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux