简体   繁体   English

Tomcat请求被超时取消

[英]Tomcat Request cancelled by timeout

I have a web application and I have problem with request timeout. 我有一个Web应用程序,我有请求超时的问题。 Problem is in request timeout. 问题在于请求超时。 When I start my application locally my method needs more than 30 seconds to finish its job. 当我在本地启动我的应用程序时,我的方法需要超过30秒才能完成其工作。 Because of this after 30 seconds request will be cancelled. 因此,30秒后请求将被取消。 I haven't this problem in real server. 我在真正的服务器上没有这个问题。 It real server this request needs 3 seconds. 真正的服务器这个请求需要3秒。 I tried to increase connection timeout in server.xml in tomcat conf folder in this fragment <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/> , but this didn't solve my problem 我尝试在此片段中的tomcat conf文件夹中的server.xml中增加连接超时<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/> ,但这并没有解决我的问题

To increase Tomcat server timeout in Eclipse, go to server view tab then timeouts. 要在Eclipse中增加Tomcat服务器超时,请转到服务器视图选项卡,然后转到超时。 There specify start and stop timeout limits, applicable if your server is not starting. 指定启动和停止超时限制,适用于服务器未启动的情况。

If server is running fine and specific request is taking more time, then check your method, if some DB or webservice operation is taking more than expected time, which might be the cause of delay and ultimately request timeout. 如果服务器运行正常并且特定请求花费更多时间,那么检查您的方法,如果某些DB或Web服务操作花费的时间超过预期时间,这可能是延迟和最终请求超时的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM