I am intentionally running a php script that last up to 60 seconds on my server with a delay between each run. The issue is that any other requests sent to the server while the script is executing are delayed until the script finishes.
Is there anyway to 'thread'(?) php to allow apache to take requests that require php while the script is running?
Apache and PHP will by default serve many concurrent connections just fine. I'll take a stab into the dark and guess that you are starting a session. The default session handler is file based, and will acquire an exclusive lock on the session file, which blocks all concurrent requests that try to use that same session file. Close the session before you go off doing long-running tasks with
session_write_close
.