My project is a web mobile app that uses a lot of AJAX
calls to the server, to refresh and retrieve data, I'm using php scripts to get data from the server.
I noticed, and also users told me, that sometimes the application performance is very slow.
I believe that it's because of the AJAX
calls, I checked my server and it doesn't has any performance problems when this problem occurs.
It is very strange, because when the problem occurs, the application send AJAX
request to the server and get stuck until the timeout error appear, and when sending it again, it performs perfectly and give an answer in less than a second.
I checked similar issues, and i saw that using php sessions
can create file lock and every request needs to wait until the previous ends.
This issue cancel the AJAX asynchronous process.
I am not using sessions but maybe my case is the same and the php scripts
perform file lock or other type of locking and cancel the asynchronous.
Anyone has any idea how can I solve this?
Thanks.