This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a Website that generates reports. I enter the input and press 'Generate Report' button. The generation of the report(just one request) takes nearly 30 minutes. I am using ExtJS, Mysql and Tomcat server in my project.
When I hosted the project in my desktop it worked fine. But, when I hosted it in a remote server (within my organization), the request to generate report gives a 400 Bad Request response. Moreover, this response from the server comes exactly 5 minutes after the request was sent. I checked the log files in the server to find no signs of any errors or even warnings.
At the client side(browser) error message says, "400 Bad Request...We can not connect to the server you have requested." My guess is that the Network or the firewall is configured some-how to timeout any request that lasts for more than 5 minutes.
Please let me know if anyone has faced this problem.
Pradyumna Nandavanam wrote:Thank you for getting back to me.
Is there no other way to tackle this issue? I mean, is there a security setting that I can change to allow the request to be treated as valid even if it takes a long time?
It wouldn't be security. But HTTP isn't designed for long-running operations anymore that it's designed for full client/server communications. HTTP is about quick in-and-out processing. If you want something that takes a long period of time, you should hand it over to something that runs in a long-term environment and only use HTTP to submit requests, get status, and possibly modify processing (for example, "cancel").
Even if you force the server to operate in the way you want, it won't operate optimally. The webapp server has finite resources and long-running requests tie them up and make them unavailable to everyone else.
An IDE is no substitute for an Intelligent Developer.