prakashivb has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am a new user of speedyCGI and I ran into a problem. I set the option -t180 on the shebang line, but it looks like speedy_backend keeps running on the server and consuming CPU. My sysadmin complained that there are 15 speedy_backend jobs running on the server consuming the entire CPU. So he had to kill the jobs and disable my executable. I haven't used my Application for almost 10 hours before my sysadmin complained. What am I missing? Has anyone seen similar problem? I was hoping that by setting timeout to 180, the process would die after 3 minutes. Isn't that so? Can anyone point me to a solution to this problem? Any help much appreciated. Thanks in advance Thnks Prakash

Replies are listed 'Best First'.
Re: Speedycgi consuming huge CPU
by bowei_99 (Friar) on Apr 12, 2006 at 00:53 UTC
    Have you tried breaking down your code into subroutines and testing each one? Also, do you need to use speedycgi? If you divide up what you're trying to do and troubleshoot each part, it makes it easier (less to deal with, i.e. if you use variables local to the subroutines) and you won't be hogging as much CPU in doing so. If you could, please let us know a bit more about what you're trying to do.

    -- Burvil

      Hi bowei, I tried creating a singleton database handle and I must be doing something wrong. The Application was hanging and the Speedy_backend instance created at this time was running for hours. I removed my attempt at singleton object and added fctnl mentioned in the Speedy docs and everything is fine. Thanks for your suggestion. It helped me approach the issue properly.
      Thanks Prakash