Extjs two ajax request blocking problem
-
12-11-2019 - |
Question
I have a problem with ajax requests. I need them to go independently not blocking each other.
The situation looks like this. I have first ajax request which takes about 1minute and multiple other requests which are almost instantaneous. The 1minute request blocks other requests from happening. I need a way around.
Edit:
Well I get a hanging process in firebug which normally ends in 200ms. The other problem is if I abort the request it still takes same time as if I didn't aborted. A bug or am I aborting it in a wrong manner?
Base concept is like this:
- load a store with onload event which has Ajax request to 60s script
- I click a button that triggers another Ajax request to 200ms script
- the second request waits for the first to end and then ends
I tried a different aproach also:
- load a store with onload event which has Ajax request to 60s script
- I click a button that triggers another Ajax request to 200ms script
- abort first Ajax request
- as expected firebug shows the request was aborted
- the second script still takes 60s+200ms to end
Any ideas?
Solution
It was a session problem. I opened the session for both scripts and first one locked the session file for the time of it's execution. Closing the session for one of the scripts solved the problem.