如何配置Apache2以允许从同一IP地址多个同时连接? [英] How do I configure Apache2 to allow multiple simultaneous connections from same IP address?
问题描述
默认情况下,Apache2似乎只允许每个IP地址一个连接。
如何配置Apache2以允许来自同一IP地址的多个同时连接? p>
这是我的情况:
- / li>
- 远程客户端发出可能需要15秒钟完成的请求。
- 同一个远程客户端发出另一个
- 目前,第二个请求位于队列中,直到第一个请求完成
,因为Apache2似乎对每个IP地址施加了一个连接的限制。
如何覆盖此默认行为并允许并行处理第二个请求?
提前感谢,
David Jones
我发现了我的问题的答案。原来,其他人遇到这个困难之前:
关键的细节是,PHP中基于文件的会话会导致来自同一客户端的所有请求被顺序处理一个队列,而不是并行。
为了解决这个问题,有必要调用 session_write_close
()在每个PHP脚本中。
- David Jones
By default, Apache2 seems to allow only 1 connection per IP address.
How do I configure Apache2 to allow multiple simultaneous connections from the same IP address?
Here is my situation:
- a web app being hosted on a server.
- a remote client makes an request that may take 15 seconds to complete.
- the same remote client makes another (independent) request.
- at present, the 2nd request sits in a queue until the 1st request completes, since Apache2 seems to impose a limit of 1 connection per IP address.
How do I override this default behaviour and allow the 2nd request to be processed in parallel?
thanks in advance, David Jones
I discovered the answer to my problem. It turns out others have encountered this difficulty before:
Simultaneous Requests to PHP Script
The key detail is that file-based sessions in PHP cause all requests from the same client to be processed sequentially in a queue, rather than in parallel.
In order to solve this problem, it is necessary to make a call to session_write_close
() in every PHP script as soon as session handling is finished.
-- David Jones
这篇关于如何配置Apache2以允许从同一IP地址多个同时连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!