开发者

Long request blocks other requests in Apache and PHP

开发者 https://www.devze.com 2023-03-13 20:50 出处:网络
I have a request that takes about 1.5 minutes to complete, but when it does the request, it blocks all the other requests by the server. I\'m using Apache with mod_php. What\'s the best way to开发者_J

I have a request that takes about 1.5 minutes to complete, but when it does the request, it blocks all the other requests by the server. I'm using Apache with mod_php. What's the best way to开发者_JAVA技巧 fix this? Thanks!


[mod_telepathy]

Do you use sessions? If so - while you haven't closed session in long script, others will wait for it.

If you don't need session there all the time - you can close it with session_write_close()

[/mod_telepathy]


File based Sessions will cause blocking. If you use a database or memcache/redis you can prevent this blocking.

0

精彩评论

暂无评论...
验证码 换一张
取 消