4

当我开始密集使用我的 API 时,我的 Apache 返回 429 错误代码。De API 调用由 SAP BusinessObject 生成并发送到我的“反向代理”以将 HTTP 转换为 HTTPS。反向代理通过 HTTPS 将 HTTP 请求转发到网络服务器。

15 个请求后,反向代理在 Apaches error.log 中返回 429 错误。这 15 个请求在 9 分钟内完成。

如何配置 Apache 以便它处理这种负载/流量?因为在前 15 个之后我还有 300 个请求......

反向代理配置:

NameVirtualHost *:80
ProxyRequests Off

<VirtualHost *:80>
        ServerName domain.com
        ServerAlias domain.com

        SSLProxyEngine On
        SSLProxyVerify none
        SSLProxyProtocol SSLv3
        ProxyPass / https://domain.com/
        ProxyPassReverse / https://domain.com/

        <Directory proxy:*>
                Order Deny,Allow
                Allow from all
        </Directory>
</VirtualHost>
4

3 回答 3

2

de webservers webserver 中的更新是问题所在。供应商更换了他们的 webserer,并在软件中设置了每分钟 5 个请求的限制......

发布中没有提到这一点。

谢谢你的时间,很抱歉打扰你。

于 2013-03-26T14:24:49.103 回答
1

我不是 Apache 专家。但是,我会尝试以下方法(在 apache 配置中):

# wait up to 300 seconds for slow clients
TimeOut 300
# allow connections to be reused between requests
KeepAlive On
# allow a maximum of 100 requests per connection
MaxKeepAliveRequests 100
# wait up to 15 seconds for the next
# request on an open connection 
KeepAliveTimeout 15
于 2013-03-26T12:53:07.653 回答
0

我认为如果您启用了 mpm 模块,您可以增加 maxThread。

您可以在此处查看安装和设置文档:

https://www.techrepublic.com/article/how-to-enable-apache-mpm-prefork-to-improve-performance/

于 2021-06-07T12:56:10.730 回答