[英]Error Page before response processing finishes
I have certain use case where processing can take upto 2 hrs of time. 我有一定的用例,处理可能要花费2个小时的时间。 so once user submit the request from browser, my understanding was browser would keep on waiting for response to arrive.
因此,一旦用户从浏览器提交请求,我的理解是浏览器将继续等待响应到达。 But I get error page after some 15-20 mins.
但是约15-20分钟后,我得到了错误页面。
I understand that web request should not so much time consuming, but i stuck with the existing architecture and design. 我了解Web请求应该不会花费很多时间,但是我坚持使用现有的体系结构和设计。
Can some one suggest some solution for this problem. 有人可以为这个问题提出一些解决方案吗?
I am using IE 9 as browser. 我正在使用IE 9作为浏览器。 Tomcat as server.
Tomcat作为服务器。
Most probably the server timeout is about 15 min, therefore you get the error after 15 min. 服务器超时很可能约为15分钟,因此15分钟后您会收到错误消息。 One solution is to increase the server timeout.
一种解决方案是增加服务器超时。 But increasing to 2 hours would be too long.
但是增加到2小时将太长。 Another option is to poll the server from the browser to find out the status of the task.
另一个选择是从浏览器中轮询服务器以找出任务的状态。 You can use ajax call for the purpose.
您可以为此目的使用ajax调用。
What you could do for similar issues is create a separate thread on the server and return a response to the user saying that job has been started and then either 对于类似问题,您可以做的是在服务器上创建一个单独的线程,并向用户返回一条响应,说作业已经启动,然后执行
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.