One page on my small site is really a PHP script that utilizes professional() to produce another PHP script which creates a PDF document.

The PDF might take thirty seconds to create. After I hit the refresh button throughout this method, I'm finding sporadic behavior. On my Mac and Home windows local dev machines, refreshing the page will hang Apache. On my small production Linux server, I do not appear to see the issue.

Why? I do not care that my dev machines hang, Among the finest to be certain it will not ever take place in production.

Thanks, John

Would you run exec() each time the page is made, or have you got some logic to check on if the previous php script has finished?

You might be producing a brand new PDF any time you refresh the page. If the requires a while, it may be hanging Apache because all of the threads in the thread-pool are awaiting the exec'ed scripts to complete, if they are not detached correctly.

If that's the situation, it might certainly hang Apache in your production server.