Re: Decaying Performance under newer apache/mp versions

[prev] [thread] [next] [Date index for 2005/05/09]

From: Perrin Harkins
Subject: Re: Decaying Performance under newer apache/mp versions
Date: 20:36 on 09 May 2005
On Mon, 2005-05-09 at 15:22 -0400, J.e. Turcotte wrote:
> Our OS guys feel like it's gotta be a code 
> problem, while I feel that perhaps our apache and/or modperl installs on 
> these machines are not ideal, or that in the move from mp1 to mp2, some new 
> capacities in modperl2 are allowing a breakdown of otherwise good structures 
> under mp1.

If possible, I'd suggest you try to run your code on these machines with
mp1 as well, to determine if that is the source of your problems.
However, if you're doing lots of work with the Apache API and had to
change it to make things work under mp2, that won't be much help.

Problems of this nature usually result from one of these:

- A database handle that is opened prior to forking, or inadvertently
stashed in a closure so that when the database connection times out the
reconnection doesn't work.

- Some kind of socket or file access that is opened before forking and
then used simultaneously from multiple processes.

- An XS module with C code that gets flaky when used in a forking
scenario or in certain error conditions.

To track it down, I would suggest you add significant logging and/or
assertions to your application.  This would allow you to check for
various things (a valid database handle that responds to ping(), a valid
$r object, expected input, etc.) along the way, and see where things
fall apart when they do.  This will lead you to the problem.

You could also see what happens when you set a really short timeout on
connections in the database, to check if the problem involved
reconnecting.

- Perrin

(message missing)

[mp2] [PATCH] implement ap_save_brigade
Dorian Taylor 18:22 on 09 May 2005

Re: Decaying Performance under newer apache/mp versions
Ricardo Ramos Massaro 20:08 on 09 May 2005

Re: Decaying Performance under newer apache/mp versions
Perrin Harkins 20:36 on 09 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Stas Bekman 21:37 on 09 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Dorian Taylor 22:21 on 09 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Stas Bekman 23:00 on 09 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Dorian Taylor 23:30 on 09 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Stas Bekman 01:31 on 10 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Stas Bekman 05:13 on 13 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Dorian Taylor 19:48 on 17 May 2005

Re: [mp2] [PATCH] implement ap_save_brigade
Stas Bekman 19:51 on 17 May 2005

Generated at 15:53 on 25 May 2005 by mariachi v0.52