Re: mod_fastcgi not playing nice with Apache?

Rich West <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
This is what I am seeing.. it never seems to suid as apache, and those 
processes are stale..
 > ps -ef | grep http
root     25243     1 94 23:15 ?        00:00:06 /usr/sbin/httpd
root     25261 22355  0 23:15 pts/0    00:00:00 grep http
root     25264 25243  0 23:15 ?        00:00:00 /usr/sbin/httpd
apache   25265 25243  0 23:15 ?        00:00:00 /usr/sbin/httpd
apache   25266 25243  0 23:15 ?        00:00:00 [httpd] <defunct>
root     25267 25243  0 23:15 ?        00:00:00 /usr/sbin/httpd
root     25268 25243  0 23:15 ?        00:00:00 /usr/sbin/httpd
root     25269 25243  0 23:15 ?        00:00:00 /usr/sbin/httpd
cranium:/etc/httpd/conf> ps -ef | grep http
root     25243     1 73 23:15 ?        00:00:06 /usr/sbin/httpd
apache   25262 25243  3 23:15 ?        00:00:00 /usr/sbin/httpd
root     25263 25243  0 23:15 ?        00:00:00 /usr/sbin/httpd
root     25264 25243  0 23:15 ?        00:00:00 /usr/sbin/httpd
apache   25265 25243  4 23:15 ?        00:00:00 /usr/sbin/httpd
root     25267 25243  0 23:15 ?        00:00:00 /usr/sbin/httpd
root     25268 25243  0 23:15 ?        00:00:00 /usr/sbin/httpd
root     25269 25243  0 23:15 ?        00:00:00 /usr/sbin/httpd
root     25276 22355  0 23:15 pts/0    00:00:00 grep http

Now, with all fastcgi servers disabled, this is what I would expect to 
see :/> ps -ef | grep http
root     25326     1 82 23:16 ?        00:00:06 /usr/sbin/httpd
root     25338 22355  0 23:16 pts/0    00:00:00 grep http
root     25339 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
root     25340 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
root     25341 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
root     25342 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
root     25343 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
root     25344 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
root     25345 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
root     25346 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
:/> ps -ef | grep http
root     25326     1 65 23:16 ?        00:00:06 /usr/sbin/httpd
apache   25339 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
apache   25340 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
apache   25341 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
apache   25342 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
apache   25343 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
apache   25344 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
apache   25345 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
apache   25346 25326  0 23:16 ?        00:00:00 /usr/sbin/httpd
root     25348 22355  0 23:16 pts/0    00:00:00 grep http

It really has me scratching my head..

-Rich


Rich West wrote:

> I have a peculiar situation which crept up only a few weeks ago and I 
> have been able to narrow it down to RequestTracker + mod_FastCgi.
>
> About 3 weeks ago, I updated to the latest FC2 kernel and a number of 
> other nondescript packages.  Around the same time, I started 
> experiencing, on a nightly basis around 4:20am, where the web server 
> would become unresponsive.  The server was running, but not handling 
> any requests.  Restarting the web server would bring it back on-line 
> until the next evening.
>
> I'll omit all of the debugging here as it would not be relevant, but 
> suffice it to say that at 4:20am, logrotate would come along and kill 
> -USR1 httpd after rotating the logs, which was the same time that 
> things tanked out.  Sounds like an Apache problem, right?
>
> Well, I dug further, and recompiled the custom modules that we utilize 
> (mod_auth_ldap2 and mod_fastcgi) to use the newer version of the web 
> server.  We're pretty stuck on mod_fastcgi 2.4.0 because 2.4.2 does 
> not support running FastCgiServer processes within VirtualHosts (who 
> thought disabling that was a good idea?!).
>
> Long story short, it turns out that, upon startup, if a FastCGI server 
> is configured to run, *most* of the httpd processes fork off and run 
> as root (bad) with the remaining 2 or 3 processes running as the 
> apache user (not including the parent process, of course).  In the 
> situations where the server was unresponsive from 4:20am, all of the 
> processes were running as root.  So, if all of the processes were 
> running as root, the web server is completely unresponsive.
>
> Essentially what is happening is that apache forks off its children, 
> some are running as "apache", most are running as "root".  The ones 
> running as "root" are just hanging out there.. when the kill -USR1 
> comes along, it stops all of the "apache" owned processes, but the 
> root ones hang around like dead leaves on a tree.
>
> So, back to the debugging, if I disable the FastCgiServer processes 
> (just commenting them out) and start up the server, everything comes 
> up just fine; all of the httpd server processes come up as they should 
> with all of them being owned by the "apache" user.  If I have the 
> FastCgiServer processes enabled, then 2 or 3 of forked web server 
> processes run as apache, the rest run as root..
>
> Is this just us?! Could this be kernel related?  I've personally been 
> using RT with mod_fastcgi for ages.. it is just plain odd that it has 
> tanked out on us like this.
>
> I would prefer *not* to move back to mod_perl as I have been very 
> happy with mod_fastcgi up until now.
>
> As a note, I have tried mod_fastcgi 2.4.0, 2.4.2, and the SNAP version 
> just to see what happens.  All behave the same way.. :(
>
> -Rich
> ___________________________________
> fastcgi-developers mailing list
> http://fastcgi.com/fastcgi-developers/



-- 
Richard West               $14.95 Registrations    mailto:[email protected]
Wesmo Computer Services    .com .net .org .tv .cc  http://www.wesmo.com
Full Domain & Web Hosting  .BIZ .INFO & MORE!!      

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.