Loading ...
Sorry, an error occurred while loading the content.

61057Re: mod_perl crashing / hanging

Expand Messages
  • Tom Schindl
    Oct 1, 2004
    • 0 Attachment
      Alex Greg wrote:
      > Geoffrey Young wrote:
      >
      >>
      [...]

      >
      > Thanks for your response. Sorry I wasn't clear; the httpd processes
      > don't actually kill the server, they just slow Apache right down to the
      > point at which it doesn't respond to requests any more. I am still able
      > to get onto the box and kill the processes etc. without having to do a
      > hard reboot or anything. My question is what's causing Apache to get
      > into the state where it can't fork any more shells from Perl.
      >
      >>> This is because a shell call to date ($date = `date`;) is failing - this
      >>> is most likely what's causing the failure to fork we see above.
      >>
      >>
      >>
      >> if you want to avoid that shell call try POSIX::strftime() instead.
      >
      >
      >
      > We have quite a lot of calls via backticks throughout our code - and not
      > just for things like date that are trivially replaceable. Would you
      > recommend replacing these as far as possible?

      Yes because calling the shell is fairly slow if there are any
      perl-modules you could use these instead and it will certainly give you
      a performance boost.

      What calls do you make, are these custom programs? If not I'd take a
      look at CPAN maybe someone has already written a Perl-Module which does
      exactly what you need else you could maybe write it your own. I have
      done this for example librsvg because I wanted to avoid calls to the
      shell inside my httpd-processes.

      [...]

      Tom

      Reclaim Your Inbox!
      http://www.mozilla.org/products/thunderbird

      --
      Report problems: http://perl.apache.org/bugs/
      Mail list info: http://perl.apache.org/maillist/modperl.html
      List etiquette: http://perl.apache.org/maillist/email-etiquette.html
    • Show all 7 messages in this topic