在Apache和PHP长的请求阻止其他请求 [英] Long request blocks other requests in Apache and PHP

查看:165
本文介绍了在Apache和PHP长的请求阻止其他请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有需要约1.5分钟,以完成一请求,但是当它的请求时,它阻止由服务器中的所有其他的请求。我使用的Apache mod_php的。什么是解决这一问题的最佳方式?谢谢!

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 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.

如果您不需要会话那里所有的时间 - 你可以用 session_write_close()关闭

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

<子> [/ mod_telepathy]

这篇关于在Apache和PHP长的请求阻止其他请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆