in reply to Can flock occasionally fail on systems that support file locking?

However, I'm beginning to suspect that occasionally (maybe when the web server is busy) the flock call fails.

If you're unable to show us code (or even if you are), it sounds like this calls for a basic debugging technique: strip extraneous stuff out, and see if you can come up with a small example that demonstrates the problem. Quite often, the act of removing stuff that you think isn't part of the problem either reveals that some of it really is. Or, the real problem is laid bare.

Since you're working with CGIs, that might mean figuring out some way of programmatically driving the web server (e.g., by multiple LWP clients).

  • Comment on Re: Can flock occasionally fail on systems that support file locking?

Replies are listed 'Best First'.
Re: Re: Can flock occasionally fail on systems that support file locking?
by rzward (Monk) on Jul 10, 2003 at 17:01 UTC
    Thank you for your reply.

    Unfortunately, I am not able to do much debugging because this is happening on a live project on a customer's web server which belongs to an ISP. My customer doesn't want me to make debugging changes to the script while the project is going on.

    So far, I'm unable to reproduce the problem on my own web servers. This leaves me to discuss theory and such, which is what brought me here.

    What makes it more difficult is it appears to happen when there a lot of simultaneous submissions. I will ask but I don't think I will even be able to copy a test script to their web server and test many simultaneous form submissions.

    I guess I could show some code, but I'm looking to get a better understanding of flock -- beyond all that is available online and in the Perl Cookbook and Programming Perl books.

    Richard