Re: [Mod-fcgid-users] Debian Etch: Strange delay upon first start of fcgi-application (PHP)

2008-03-10 Thread Gabriel Barazer
On 03/10/2008 3:19:16 PM +0100, Tobias Wiersch [EMAIL PROTECTED] wrote:
 
 Gabriel Barazer schrieb:
 1) Is the delay *exactly* 2 seconds when calling a PHP script (before 
 getting the http error 500 from your suexec test) ? Or is there another 
 additionnal delay to look for ?
   
 I think it is a 1 second delay.
 I made a time wget http://localhost/testxxx.php; to circumvent network 
 latency (after a apache reload).
 Result1: real0m1.054s
 Result2: real0m1.056s
 (unpatched suexec, php was normally loaded, script contained only an echo)
 
 Subsequent requests:
 Result1: real0m0.008s
 Result2: real0m0.009s
 
 And the results from a server running under Debian Sarge instead of Etch 
 (the Etch server is actually much faster and the Sarge server slower - 
 but the results for the first call are nonetheless 10 times better under 
 Sarge!?)
 first call: real0m0.119s
 second call: real0m0.023s

I'm confused. Is it the same server, same kernel  other 
hardware/software specs ? If you try 2 different debian distrubtion, 
there may be some changes in PHP/libraries.

What you need to do to isolate the problem is leave PHP alone because 
you have the start delay even without it. calling exit() within suexec 
or returning just before the execv is a good test case.

Can you test on your 2 servers with the patched suexec? Test multiple 
times with apache stop or reboot commands between to be sure the delay 
is the same. If it's the same delay, it's likely to be a hardcoded time 
value; if the delay changes, it can be a library load time or a cache 
prefetch time.

Are you installing mod_fcgid with the automated system (apt-get) or 
compiling from source? I know many debian users love to use the apt-get 
system, but this is really not what you want to do to test a specific 
problem in a specific module version. You have to only modify 1 thing 
between your tests or you won't be able to isolate the problem.
It's like you have a cold AND headaches, and you take 2 different pills: 
you won't know which one made your headaches disappear.

 Oh, and add something like -s 4096 to the strace command to see more on 
 the socket read.
   
 
 Strace with -s 4096:

nothing relevant here

Gabriel

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users


Re: [Mod-fcgid-users] Debian Etch: Strange delay upon first start of fcgi-application (PHP)

2008-03-10 Thread Gabriel Barazer
On 03/10/2008 7:53:10 PM +0100, Tobias Wiersch [EMAIL PROTECTED] wrote:
   
 Yes, the results were from 2 servers.
 The Etch-server has the problem. I wrote the results from the sarge 
 server only to show the difference.

can you tell what is the mod_fcgid version on each server? If the 
version is the same, you may be facing the same bug on each server, but 
for some reason it's not triggered on Debian Sarge.

Anyway, if it's a bug and we have to relase an update, you'll have to 
compile from source and not from packages...

 What you need to do to isolate the problem is leave PHP alone because 
 you have the start delay even without it. calling exit() within suexec 
 or returning just before the execv is a good test case.
 Can you test on your 2 servers with the patched suexec? Test multiple 
 times with apache stop or reboot commands between to be sure the delay 
 is the same. 
 Ok, on Etch:
 real0m1.010s
 (always the same because the fastcgi-link to php can't be established 
 because of the exit() at the beginning of suexec)

very good to know, except if the module on etch is an old version. Have 
you set the same fcgid directives in your apache configuration?

 
 On Sarge:
 real0m0.005s
 (same patched suexec)
 Are you installing mod_fcgid with the automated system (apt-get) or 
 compiling from source? 
 I use the standard-debian package because I don't want to re-compile the 
 packages after every security fix.
 Do you think the problem is fixed in the later releases?

AFAIK Etch is newer than Sarge (I'm *really* not a Debian expert, made 
my own OS), so the fcgid module is probably newer as well. Last version 
is 2.2 and some hardcoded variables related to the scoring (the 
mechanism which determines if a new fastcgi application has to be 
spawned) have been changed.

BTW, have you got anything related to mod_fcgid in your error log? You 
have to log some info or debug level errors in your apache config. Maybe 
you will find some interesting stuff.

Gabriel

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users