I'm having an issue on our weblogic server in that it seems to be spawning multiple threads for one request.
In this case we run a job that takes in a csv file and then updates some database records; to my understanding this operation should execute as one thread on weblogic.
However after about a minute or so has passed, another thread is fired where the whole operation begins from the start and we end up with about 5-6 threads that are doing the exact same operation. We have tested this issue on dev environment and can guarantee that no other user is trying to execute the operation at the same time.
Any ideas on where I should look to solve the issue? we don't attempt to spawn any threads in our code.
It could be the case that the Web Browser is opening several connections to your server at the same time. I know in my Opera browser, where I can set the number of server connections, the default is 16 to a server at once. It helps my browser download several objects (scripts, images, the web page, embeded stuff, and so on) at the same time.
It could be the case that a web browser if so enabled, or if it has a web speed plug-in, if it wants access to some special pages that it sent data to, might resubmit the requested data when the browser puts in multiple connections to your server.
posted 9 years ago
Thank you both for the reply.
@Campbell - we are unable to debug this as the the threads are being spawned by weblogic. Debug will run on it's own thread and would only help us step through our code which we know does not spawn any threads.
@Walter - I will look further into this and let you know what we find, however I was under the impression that multiple connections are only made to retrieve multiple resources? in our case we are hitting a controller eg: /uploadfile and the code just does some inserts into the db. The only other thing that I should mention is that the browser does time out when we perform this operation. However; the multiple threads start to spawn before time out occurs.
Binesh Gunaratne wrote: I was under the impression that multiple connections are only made to retrieve multiple resources?
Use a good debugging proxy and see how many requests are actually being made, and what is triggering them.
posted 9 years ago
Am a beginner and here is what I learn: There is no cause without effect and there is no effect without cause.
If the issue is not triggered from the client side (browser), then it must be on the server side.
Now if it's on the server side, it can not be WLServer alone that trigger the issue on it's own.
Either the code did some thing wrong which causes exception which causes WLServer to start a new
thread but WLServer did not take the initiative, the WLServer is told/set by a configuration setting
value on the server. (Thread pooling ?)
My guess is still is around the code. Have a peer code-review.
(BTW, thanks to Pat for Fiddler 2 HTTP Debugging Proxy.
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop