Re: Timeouts with Threaded Apache 2.2.3

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

 




On Feb 8, 2007, at 3:08 AM, Neil Martin wrote:

so we retested with a dummy module call mod_foo ( attached ) but we still get timeouts.
Is this a know issue is the module api in threaded Apache ?

You clearly based your mod_foo on mod_example, and just about the only thing you deleted was the comment atop the file that warns the mod_example code is not thread-safe. You should at least remove the call to trace_add() from the handler function, because that uses global variables and can't be used in a threaded server.

I'm trying to clean this up for the mod_example.c in our development trunk, but this has not been done for 2.2.x.

In a typical module (I think most if not all of your magic is in the handler function?), you don't need to implement any of the handlers unless you're actually using them to do something. You might override child_init to set up your database connection pool, but won't need stuff like post_read_request or http_scheme.

You can generate a very small, functional sample module by calling apxs -g -n foo

When running your benchmarks, you should make sure that you tune Apache in relation to the load you are sending it. The default worker mpm configuration tops out at 150 concurrent requests, and you are running ab at 200... that may not be a problem given the connection backlog in the kernel, but especially if your module takes some time to do its database thing, you may run out of resources and render ab confused. See conf/extra/httpd-mpm.conf to get an idea of the tunables for the worker MPM.

S.

--
sctemme@xxxxxxxxxx            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF


Attachment: smime.p7s
Description: S/MIME cryptographic signature


[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