我正在对现有网络服务进行故障排除。它以前工作得很好,但现在对 postgreSQL 数据库的基于 SOAP 的请求导致“未知错误:获取 http header 时出错”错误。
在查找这个问题时,我遇到了以下提示:
When you get errors like: "Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http headers in" after a few (time intensive) SOAP-Calls, check your webserver-config.
Sometimes the webservers "KeepAlive"-Setting tends to result in this error. For SOAP-Environments I recommend you to disable KeepAlive.
Hint: It might be tricky to create a dedicated vhost for your SOAP-Gateways and disable keepalive just for this vhost because for normal webpages Keepalive is a nice speed-boost.
我一直无法弄清楚您是如何禁用 KeepAlive 或在何处设置此参数的。我试过 grep -i "keepalive"/usr/share/tomcat5/conf/*
,结果是否定的。
可能由于服务器环境的变化,这是我的系统管理员的问题,但我确实有 root 权限。
谢谢你的帮助,堆栈!
最佳答案
在 Tomcat 的 server.xml 文件中,将 HTTP 连接器上的 maxKeepAliveRequests 属性设置为 1 以有效禁用保持事件。
更多信息:
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html#Standard_Implementation
关于postgresql - SOAP "error fetching http headers": how do I do suspected solution of disabling keep-alive?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9117376/