1

Caveat: I realize this is potentially a server configuration question, but I thought there might be a programmatic answer, which is why I am posting here...

Running PHP on Apache, our users were able to issue multiple concurrent requests (from different tabs in the same browser, for example).

Since moving to FastCGI under IIS, this is no longer the default behavior. Now, when a user starts a request to the server and the browser is waiting for a response, if they open a new tab and start another request, the new request is not processed by IIS until the previous request is completed by IIS.

If the user opens a different browser and logs in (which starts a new session for that user), concurrent requests are possible.

My question is: is there a way to configure FastCGI/IIS7 that will allow multiple concurrent requests from the same user session? If not, is there an alternative that would allow this?

2 Answers 2

3

The problem is the session mechanism, most likely. PHP Sessions, by default, since they are using the file system, have to wait for the session file to be closed before they can open them again. Therefore, subsequent requests for the same session wait on prior requests, or to give another example in addition to yours, if you had a frameset page (shudder) with three frames, each referencing the session, they would all load one at a time, because each page would have to wait for the session mechanism.

Possible Solutions:

  • As soon as you're done with the session, call session_write_close()
  • Implement a custom DB handler which utilizes the database instead of the file system.
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your answer, but does it explain why it worked on Apache, and does not work on IIS? (The script hasn't changed)
0

It looks like I'm out of luck, at least running PHP under FastCGI on Windows: PHP FastCGI Concurrent Requests

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.