Re: [Lxr-dev] Further testing
Brought to you by:
ajlittoz
From: Jan-Benedict G. <jb...@lu...> - 2001-08-19 15:24:56
|
On Sun, 2001-08-19 23:40:42 +0900, Malcolm Box <ma...@br...> wrote in message <3B7...@br...>: > Jan-Benedict Glaw wrote: > > Well, I think I've found some things... > > > > ps axwwwf: > > > > 11144 ? Z 0:00 | \_ [co <defunct>] > > 8800 ? S 0:05 \_ /usr/sbin/apache > > 11082 ? Z 0:00 \_ [co <defunct>] > > 9505 pts/0 S 0:00 /usr/lib/postgresql/bin/postmaster -D /var/lib/postgres/data > > 10872 pts/0 S 0:00 \_ postgres: www-data lxr-cvs [local] idle in transaction > > 10874 pts/0 S 0:00 \_ postgres: www-data lxr-cvs [local] idle in transaction > > So you're seeing idle postgres processes during a execution of > "source"? I don't know enough about psql to know if this is normal, nor > what sort of error this is. Do you have any clues? Seems I'm getting nearer: Whenever I fetch a *file* (not a directory index) one "co" is opened, as well as a DB connection to fetch function names/variables/... As I think, these DB connections are not properly closed. So apache (aka mod_perl) keeps them opened (which is what you see as idle in transaction postres processes). Further more, not finding libraries/modules (heck, what is it exactly called?) starts after retrieving more or equal pages (read: C files) from apache than there are apache child worker processes running. In apache, there's done some kind of round robin: Think of one master process (getting a request) and 6 workers (sending the requested material). The workers are handled in some kind of ring buffer. So after a /etc/init.d/apache restart you'll get some clean pages (as many as there are workers). Then, you'll hit an older apache worker which already has got some opened DB connectio. Crash. (Oh, yes, and there are all those zombie co's as well...) Something then closes these DB connections (I've not got any clue about this. It even might be that the apache master process detects some trouble and kills one of it's worker threads and restarts a new one). Those new threads are ready to feed *one* clean page again... MfG, JBG -- Jan-Benedict Glaw . jb...@lu... . +49-172-7608481 |