In theory, there is nothing that would prevent a single launch of a PHP script several times in parallel - otherwise, many websites would have big problems; -)
So, in your situation, there are probably some mecanism blockers that prevent this ...
If your script uses sessions and they are file-based (this is the default), these sessions can cause this problem: using the default session handler it is not possible to get multiple files accessing the same session data (i.e. data Sessions that match the given user) simultaneously; that to prevent 1 script from overriding the data of another and probably should not be disabled.
So if your script uses sessions: would it be nice if you stopped using sessions?
If not, try closing them as soon as you don't need them - unlock the files that are used to store them.
Here is a quote from the session_write_close page, about which:
Session data is usually saved after your script is completed without having to call session_write_close (), but as the session data is blocked, only one script can be written to a session at a time at any time .
When using framesets along with sessions, you will experience loading frames one at a time because of this lock.
You can reduce the time required to load all frames by ending the session as soon as possible since all changes to the session variables are made.
source share