Problems with error logs under mpm_worker

Problems with error logs under mpm_worker

am 17.02.2010 20:55:06 von Ross Lawrie

Hi,

I've tried to find some answers to this by searching the list archives
and Google, but haven't been able to find anything matching my
circumstances. Hopefully someone here can help me figure this out, or
point me in the right direction for me to solve it myself.

I've recently switched my server over to using mpm_worker rather than
mpm_prefork, and I'm having problems with much reduced information in
the error logs.

Whereas before I might see something like this:

[Wed Feb 17 10:58:37 2010] [error] [client 114.198.145.132] [pid 23028]
main: filename = support_menu.pl

I now only see:

[pid 1254] main: filename = support_menu.pl

In addition, it seems that any ErrorLog entries in my vhosts are
ignored, and only the main ErrorLog entry is used.

I am running Apache 2.2.14 (patched with CVE-2009-3555-2.2.patch), built
with the following configure options:

"./configure" \
"--prefix=/usr/local/apache" \
"--disable-userdir" \
"--enable-rewrite" \
"--enable-so" \
"--enable-info" \
"--enable-status" \
"--enable-ssl" \
"--enable-cgi" \
"--enable-unique-id" \
"--enable-mime-magic" \
"--with-included-apr" \
"--with-mpm=worker" \
"$@"

I have modsecurity on this Apache installation also, however I've tried
disabling it and still see the same behaviour.

Upon switching back to mpm_prefork, logs act as I've come to expect in
the past.

I haven't seen any notes about a difference in logging behaviour between
prefork and worker, but maybe I've not dug deep enough?

The OS platform is Debian 4.0 if that's relevant, and the prefork and
worker sections of the httpd.conf are pretty much the defaults:

# prefork MPM

ServerLimit 1000
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 250
MaxRequestsPerChild 0


# worker MPM

StartServers 10
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0


Definitely appreciate any advice anyone can give. Again, this only
seems to happen when switching from prefork to worker, disabling
modsecurity, switching back to Apache 2.2.13 don't seem to have any
effect.

Thanks,

Ross Lawrie.


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

Re: Problems with error logs under mpm_worker

am 19.02.2010 21:01:27 von Jeff Trawick

On Wed, Feb 17, 2010 at 2:55 PM, Ross Lawrie wrote:

> I've recently switched my server over to using mpm_worker rather than
> mpm_prefork, and I'm having problems with much reduced information in
> the error logs.
>
> Whereas before I might see something like this:
>
> [Wed Feb 17 10:58:37 2010] [error] [client 114.198.145.132] [pid 23028]
> main: filename = support_menu.pl
>
> I now only see:
>
> [pid 1254] main: filename = support_menu.pl
>
> In addition, it seems that any ErrorLog entries in my vhosts are
> ignored, and only the main ErrorLog entry is used.

I suspect that this is from the switch to mod_cgid (configure will do
that for you automatically when you use worker MPM, since mod_cgi
isn't reliable with a threaded MPM).

To confirm, use mod_cgid with prefork and see if you encounter the
same logging issues.

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

Re: Problems with error logs under mpm_worker

am 02.03.2010 02:22:02 von Ross Lawrie

On Fri, 2010-02-19 at 15:01 -0500, Jeff Trawick wrote:
> On Wed, Feb 17, 2010 at 2:55 PM, Ross Lawrie wrote:
>
> > I've recently switched my server over to using mpm_worker rather than
> > mpm_prefork, and I'm having problems with much reduced information in
> > the error logs.
> >
> > Whereas before I might see something like this:
> >
> > [Wed Feb 17 10:58:37 2010] [error] [client 114.198.145.132] [pid 23028]
> > main: filename = support_menu.pl
> >
> > I now only see:
> >
> > [pid 1254] main: filename = support_menu.pl
> >
> > In addition, it seems that any ErrorLog entries in my vhosts are
> > ignored, and only the main ErrorLog entry is used.
>
> I suspect that this is from the switch to mod_cgid (configure will do
> that for you automatically when you use worker MPM, since mod_cgi
> isn't reliable with a threaded MPM).
>
> To confirm, use mod_cgid with prefork and see if you encounter the
> same logging issues.
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


Jeff,

Thanks for the reply.

I've rebuilt with prefork and cgid; this does indeed seem to be the
source of what I'm seeing. From the mod_cgid page I don't see anything
that suggests a way of showing the log format I'm previously used to.
Is there a way to have the same log info displayed under mod_cgi ([Wed
Feb 17 10:58:37 2010] [error] [client 114.198.145.132] [pid 23028] main:
filename = support_menu.pl) shown under mod_cgid, or is that just not
possible under the mod_cgid model?

Thanks again,

Ross.


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