为什么阿帕奇不处理同时从同一个浏览器的多个请求 [英] Why does apache not process multiple requests from the same browser simultaneously

查看:281
本文介绍了为什么阿帕奇不处理同时从同一个浏览器的多个请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不太清楚如何词组这个问题的正确,所以我会用我所遇到的情况开始。

I'm not quite sure how to phrase this question correctly, so I'll start with the scenario I encountered.

我有位处理的在我的web应用程序,需要更长的时间比我想用户等待再次在页面的控制权,所以我决定把它由一个Ajax请求处理。

I have a bit of processing in my web app that takes longer than I'd like the user to wait to have control of the page again, so I decided to have it processed by an ajax request.

问题是,即使我卸载这个请求转换成一个Ajax请求,似乎阿帕奇不会处理任何进一步的请求,直到原来的处理器沉重的请求完成。

The problem is, even though I offloaded this request into an ajax request, it seems that apache won't process any further requests until the original processor heavy request is complete.

我本来想知道我怎么能解决这个问题,但既然决定,这可能是一般一个坏主意。

I originally wanted to know how I could get around this issue, but have since decided that it might be a bad idea in general.

不过,我仍然好奇,如果有人知道为什么阿帕奇行为这种方式,什么(如果有的话)的配置指令控制它。我最初的想法是的KeepAlive,但禁用了似乎没有改变的行为。

However, I'm still curious if anyone knows why apache behaves this way, and what (if any) configuration directive controls it. My original thought was KeepAlive, but disabling that didn't seem to change the behavior.

我是通过mod_php下运行PHP,如果有差别。

I am running php through mod_php if that makes a difference.

我AP preciate越来越指出了正确的方向上的任何帮助!

I appreciate any help getting pointed in the right direction!

推荐答案

您使用基于文件的会议? PHP将锁定会话文件为每个请求,直到你做了 session_write_close()或脚本终止/退出保持这种锁。这样做的副作用是,所有的请求成为串行的,因为他们都在竞争同一个单一的资源(会议文件)。

Are you using file-based sessions? PHP will lock session files for each request and maintain that lock until you do a session_write_close() or the script terminates/exits. The side effect of this is that all requests become serial, since they're all contending for the same single resource (the session file).

这篇关于为什么阿帕奇不处理同时从同一个浏览器的多个请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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