Hi On 03/10/2008 11:08:14 AM +0100, Tobias Wiersch <[EMAIL PROTECTED]> wrote: > Hello there! > > I'm using mod_fcgid on several servers since Debian Sarge. > On Debian Sarge all is running fine. > But ALL three Etch-servers (1 updated from sarge, 2 freshly installed) > have a delay-problem: > > When I do a "apache2 reload", all spawned PHP-fcgi-tasks will die, which > is normal behaviour.
I suppose this command is an init script and really does "apachectl -k graceful" ? Can you confirm this ? Since these init scripts are not part of the apache distribution, we don't know *exactly* what they do and there _is_ a big difference between the "-k graceful" and "-k restart" command for example. > But when I then call a PHP-script from a webpage for the first time, it > will take 1-2 seconds to initialize! When I call the PHP-script again, > it will then load instantly. > > So why there is such a delay at the first call? All my servers with > Sarge don't show this init-delay, only all servers with Etch. > > I first thought that the delay was caused by PHP (loading of all > modules?), but this doesn't seem to apply: > I tried to track down the problem and it seems that it will happen > BEFORE suexec/PHP is loaded. > To verify this, I patched suexec to exit immediatly at start. > When I then load a PHP-script with the patched suexec, the delay is > still there, and after that I receive the 500-Server error. > Furthermore, when I call php5-cgi from the command-line, there is > absolutely no delay. > > So I think the problem is in Apache or mod_fcgid. > Any suggestions? First you have to confirm where the delay is. To do so, you have to trace syscalls with strace. When you start apache (or reloading), take a careful look at the process table and you will see a particular httpd process which is the mod_fcgid process manager. This is the process responsible for spawning the fastcgi apps (through the suexec wrapper if necessary). To see exactly where is the delay, you have to identify the process ID of the process manager (hint: the memory consumed by this process is slightly different than the other httpd processes, excluding the parent). then: strace -ff -r -p <PID>. And post the result here when experiencing the problem. You should have a line indicating the delay with the time counter at the beginning of each line. This will show us where the fcgid process manager is sleeping instead of spawning and yelling at the php processes to do their job. Gabriel ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Mod-fcgid-users mailing list Mod-fcgid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users