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

Hello Monks, I am running a perl-based webserver on RH 7.1 where the user submits data which is then passed onto a pipeline of various software applications. Towards the end of this pipeline, I get the error: cp 1.html results.html: Resource temporarily unavailable where the processing appears to hang. I have checked for excess swapping, which appears to be fine. Any ideas on a possible cause?
  • Comment on CGI error: Resource temporarily unavailable

Replies are listed 'Best First'.
Re: CGI error: Resource temporarily unavailable
by Roger (Parson) on Jun 16, 2004 at 13:44 UTC
    Sounds like race condition to me. It is possible that you are trying to copy 1.html to results.html, while 1.html is being created, possibly resulting in some sort of dead-lock. Your best best is to review your system design and architecture, identify possible race conditions, and set semaphores/locks to avoid it. Without much detail in your description, this is the best suggestion I can offer.

      Thanks for your response. What is puzzling me is that this site has been ported from a different machine where it worked perfectly fine. Is it possible that a lock may be required on one system but not another?? Thanks again.

        What's the difference between the two machines? Is one using a different OS (or version), a different filesystem, etc.

        Also keep in mind that race conditions can be notorious to pinpoint. It may have be that the new machine runs faster and the rare occurance (on the old machine) is now common place.

        Jason L. Froebe

        No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

        Can you provide a snip of your code? And was your other machine the same build and the same architecutre?