On Mon, Jul 28, 2003 at 10:31:34AM -0400, Jesse Guardiani wrote: > Is there a way to debug things like this and figure out what is > causing the hang? Can I run something like ktrace on an already > running process?
ktrace -p <pid> does the trick nicely. 'ktrace -C' then stops tracing systemwide, a good thing to have handy if tracing a process in an infinite loop :-) Did you get a chance to do a 'top' or 'ps' to show it's actually a sqwebmail process at fault? > Can I somehow compile sqwebmail with > debugging code so that I can trace the sqwebmail process when > a CPU hog appears? I don't think so, since I can't see how to distinguish 'CPU hog' from 'normal process doing a lot of work'. You can perhaps attach gdb to a running process, but I've not got to that stage yet. > I get sqwebmail CPU hogs every few days on my server, so I'd really > like to figure out what the problem is. My box is a FreeBSD 4.8- > RELEASE box. And I've been experiencing these sqwebmail hangs > for months now. And I'm not even running FastCGI. :) sqwebmail does fork some child processes: gzip, and the banner program if you're using that. You might like to try 'configure --without-gzip' and see if that helps. At the moment I'm running sqwebmail configured with FastCGI (and therefore without-gzip), but running it as a normal CGI because of the FastCGI problems. I don't see any CPU hogs, and it's a moderately active server (about 400K impressions yesterday, about 65K of which are CGI and the rest are images/stylesheets) Cheers, Brian.
