Symfony 2 blocked concurrency

后端 未结 2 1992
失恋的感觉
失恋的感觉 2021-01-20 05:34

I have a Symfony 2.5 application and I have some weird problems with request concurrency.

To demonstrate the issue I\'ve created two routes called /time

2条回答
  •  长情又很酷
    2021-01-20 05:50

    While I think you have found an answer in the comment above, it is worth noting there is a reason why you can end up with one request to your server blocking another. Both web servers and browsers actively limit the number of open connections to a single host. The HTTP standard actually says that any client should not have more than 2 (!!!) active connections at the same time: http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.1.4 . Modern browsers usually allow more, see Max parallel http connections in a browser?, but they still limit you.

    To get around this issue people often set up multiple host names for a single server (for instance using CNAMES) so the limit does not apply.

提交回复
热议问题