Once my page is loaded, I perform an Ajax call to a php script, which updates my server. However this script can sometimes take over a minute to complete, and while the scri
adeno's comment above is correct.
"in PHP only one script at a time can operate on the same session, so as to not overwrite session data etc. So when doing two ajax calls to PHP scripts within the same session, the second has to wait for the first to finish"
to help speed things up you can write to and end a session early(session_write_close()) to release the session-lock and allow another script using the session to continue.
note: you can still read from your $_SESSION variable after calling session_write_close but you may no longer write to it.
you can find a good example of this here: PHP Session Locks – How to Prevent Blocking Requests
example provided from the link above: