I have a few small PHP scripts which seem to temporarily hose Apache 2.0. One script I have uses the exec() command to retrieve the results of a perl script, and another uses the copy() command to fetch a remote file.
Neither the perl script nor the copy script execute instantly, averaging anywhere from a few seconds to a few minutes to complete. While these PHP scripts are executing (when loaded in a web browser), all other instances of Apache fail to respond to browser requests. This occurs until the script completes, at which time Apache responds to the other requets immediately.
I thought this may have been specific to my previous Linux RPM configuration, but have since switched to FreeBSD and am now with the same problem. The scripts run fine, they're very elementary and the code is not a problem. I am able to run other scripts which do not use exec() or copy() and they process as normal.
Does anyone know how to isolate the HTTP instance running the PHP script so the web server does not fail to respond to other requests?
I am stumped, any help is greatly appreciated.