views:

139

answers:

3

Hi, We have a memory intensive processing for certain functionality and we would like to limit the number of parallel requests to this processing. We are able to configure by using "Work Managers" in WebLogic and putting a limit on the number of threads for that servlet.

For example, if we put maximim thread limit as 3, then if there are 10 parallel requests; 7 requests are in queue. There could be situations where these the requests waiting in queue could take up to 30-40 minutes to be processed. We did simple testing and the received page cannot be displayed due to timeout after 15 mins and received the message after 1 hour.

Does any one know if there is a setting in WebLogic to increase/decrease timeout and avoid page cannot be displayed?

Appreciate if any one has any thoughts around this.

A: 

1) Use some other tool (not browser) like WGET where you can control timeout parameter (--timeout).

2) Why do you use HTTP? Use message driven beans and send message JMS to that and don't care about time outs.

Superfilin
Thanks for the reply. The above processing starts when a user clicks on a button and we would not mind the user waiting while this is processed. So, would like to check if a request is made to server, and the server is taking around 30 minutes, does browser timeout?
stranger001
You have good users :). I would mind waiting 30 minutes ;). Why don't you just send a JMS message on button click and let the user do other things? And you may also have some other page where user may the status of the job.
Superfilin
As to the timeout I think it depends on many factors not only browser, but also potentially the timeout of your router, network driver etc. For example, in FireFox you can set time out using these parameters *network.http.connect.timeout* and *network.http.request.timeout* (http://forums.techguy.org/web-email/391515-setting-timeout-firefox.html).
Superfilin
+1  A: 

Does any one know if there is a setting in WebLogic to increase/decrease timeout and avoid page cannot be displayed?

There might be something but I actually didn't check as it would be a bad advice anyway. By looking for this, you are trying to solve the wrong problem here. A browser is just not made for long-running process like the one you are describing (>30mn) even if you don't mind the user waiting (not mentioning that he could refresh the page and queue more and more jobs).

So, the right answer here is in my opinion: use asynchronism, this is the perfect use case. When the user clicks on the button, send a JMS message to a queue (or create a Quartz job) and send the user a page with a request ID telling him to come back later. When the processing is done, update the status somewhere and make the status/result available to the user. Really, the user experience will be better doing this and you'll face less problems than with a browser.

Pascal Thivent
A: 

Perhaps quartz can do what you need? Start a job and check in on it as you need to?

John Liptak