"maximum number of concurrent connections exceeded" 在 Delphi7 中的 isapi 应用程序中出现异常

"maximum number of concurrent connections exceeded" get exception in isapi application in Delphi7

如果我一次向服务器发送超过 32 个请求,那么它会在 apache 日志中显示 returns 500 错误代码。错误信息是

maximum number of concurrent connections exceeded

32TWebRequestHandler.MaxConnections 属性 的默认值。如果活动连接数超过此值,Web Broker 框架将引发 EWebBrokerException 消息:

"Maximum number of concurrent connections exceeded. Please try again later"

您可以将其设置为更高的值或零以表示没有限制。

既然你在你的案例中提到了 Apache,那么正确的地方就是你的 Apache DLL 的主块,例如:

begin
  CoInitFlags := COINIT_MULTITHREADED;
  Web.ApacheApp.InitApplication(@GModuleData);
  Application.Initialize;
  Application.WebModuleClass := WebModuleClass;
  Application.MaxConnections := 200;
  Application.Run;
end.