Request sent twice on WebLogic 8.1
Has anybody got this frustrating problem with Weblogic? (It is perhaps the most crappy application server!)
I have a functionality wherein the underlying jsp/java classes process a lot of data and write them to huge files. So, it takes a bit more than 4-5 minutes to execute. I am using WebLogic 8.1 and the application server shoots an additional request after 3 minutes. I double checked to see that it was not being caused by my code (double submits through javascript etc.).
I suspect that it is inferring that the previous thread has hung and is shooting a new request (which anyway is a bad method of handling hung requests..anyway). This obviously creates problems by interferring with my previous request and the whole process takes a lot longer than the user expects.
Has anyone encountered similar problems with lengthy requests on WebLogic? Any sort of help would be greatly appreciated.
[924 byte] By [
ragh_dra] at [2007-10-3 1:25:47]

Do you use weblogic plugin? If so there is a setting "Idempotent", if is on and request takes longer than HungServerRecoverSecs, it will fai over. The default value is ON.
For long processes like this, it might be an idea to start them off in a seperate thread, and return a response saying something like
"Ok, the process is started. Check back in 5 to see if I'm finished"
It requires a bit more coding overhead to control this sort of thing, but to me its the most user friendly way to kick off long processes.
I confirm that I have faced the same issue on Weblogic 8.1
There is no problem with your code. You guessed it right that Weblogic interferes when a thread takes long time to complete. Weblogic assumes it as a stuck thread and re-executes the program again.
This is the only issue I faced on Weblogic [though I would not consider it to be a crappy server].
I did a work around to solve this issue.
My program was supposed to upload say 1000 records and then process each record one by one. So I divided the program into two parts. First part upload the 1000 records and adds a new Job in a MY_JOB_MANAGER table and the second part processes the 1000 records one by one. On Linux I started a background thread which catches for new Jobs [i.e. it checks for any new entries in this table every 60 secs]. So my 'BatchJobClient' program takes care of processing the pending jobs using multi threading.
This solved the issue though there might be a workaround. But I was happy with how I tackled the problem. [I learnt this trade from my dad when he used to teach me mathematics .. he used to say that each problem can be solved in multiple ways .. so I figured out one way..maybe u guys can share another way to deal with this issue].
Cheers
-Rohit
Thanks for your replies...
jennyhu - Yes, we do use an Apache plugin, but this problem occurs when I don't route through Apache but directly to weblogic too. I read the WebLogic documentation and you are right. We did see some health check-up parameters configured for every 180 secs for the node manager. So, that might be causing this problem. Anyway, thanks for your help, it did help in the investigation of the problem. I will award 2 duke dollars to your pointer
evnafets - I agree, that is the correct approach. I had that kind of a solution in mind too..but some dates had to be refreshed on the jsp after the files were generated and certain other complications, so couldn't adopt. Thanks!
RohitKumar - Multithreading in these cases is the right approach as evnafets also pointed out. Thanks for confirming that you also faced the problem and sharing your solution!