Work managers threads constraint and page cannot be displayed

564 Views Asked by At

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.

3

There are 3 best solutions below

0
On

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.

3
On

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.

0
On

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