• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Servlet requests are created automatically in tomcat

 
Ranch Hand
Posts: 124
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Ranchers,

We have deployed one simple servlet in Tomcat which will extract the records from DB.When we give the request to that servlet , it executes well if the records are less.If the records are more (means it will execute some long time) , after some time , automatically , one new request has been generated by the Tomcat.Both the request are processing in the server.After some time, the third request has been generated.and so on...

If anybody facing these kind of issues ? Please help us to resolve this issue.

Regards,
Deepa Raja
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
3 requests generated by Tomcat? Are you sure the user is not just hitting refresh?
 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. We are sure. Only one time we have given the request.
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using a special browser that re-fires requests if they seem to be dead ?
Are there such browsers anyway ?
 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has it to do something with request time-out. And then some kind of automatic handling by Tomcat there on. As here we are talking about cases where processing is taking longer while.
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat should never create a request for any reason, and I've never heard of it doing this. My guess would be that its coming from the browser. Have you tried sticking using soemthing like wireshark to watch the traffic?
 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are using IE and firefox.

We didnt check the network traffic. Is there any header related problems?
 
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can't say what the problem is, at least not from what you describe.

Could you tell us how you come to know that "after some time automatically , one new request has been generated by the Tomcat"? Debugging statements? Message on console. What gives you a reason to think this happens?

Can you give some back ground on where the application is deployed? Internet? Intranet? On your own computer?

"If the records are more (means it will execute some long time) ,.." What does long time mean here? 5 mins? 10 mins? 15 mins?

Well maybe some of the details would give away what exactly is happening at your end ...
 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes.the Servlet is deployed in Tomat 6 /Linux in my own computer.Servlet will connect to the Database and retrieve the records.

We have system.out statements. One thread is processing the request , again the new thread is trying to execute from the starting.(Catalina.out is having log statements.)

Records will be retrieved based on dates.1 day or 10 day like that. For example if we give to retrieve the records for 1 day ,then the servlet is working properly.But , if we give 10 days to retrieve , the request is processing after some 5 mins , again new thread is started.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't see how that's possible without Tomcat being told to start a new request. I have *never* seen behavior like that without something in my code causing it to happen.

Can you provide more information?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

deepa raj wrote:
But , if we give 10 days to retrieve , the request is processing after some 5 mins , again new thread is started.



Are you sure only Tomcat is involved? Or is it fronted with maybe Apache HTTPD/mod_jk. From what i know, mod_jk has retries on request timeouts. So if a request times out, it is tried again (for some pre-configured retry attempts).
 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you please tell me more about Apache HTTPD/mod_jk ?

And also , how to check the request timeout ? Any config file?

Yes.It is using Apache 2 / Tomcat 6.0 installed in SUSE Linux .But i havent see any mod_jk related files.But i am able to see prefork related files are there.I am very new to these files.Please help me to get it resolved.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

deepa raj wrote:

Yes.It is using Apache 2 / Tomcat 6.0 installed in SUSE Linux .But i havent see any mod_jk related files.But i am able to see prefork related files are there.I am very new to these files.Please help me to get it resolved.



I am not an expert on this. The Apache HTTPD documentation http://httpd.apache.org/docs-project/ would be a better place to look. I think the file where these things are configured is workers.properties. But as i said, i don't have much experience with that.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey deepa raj,
I am going through this thread today... i am facing similar kind of an issue in my setup... can you please let me know have you found the solution for this ... this might be way old request... but this will help us in debugging in and fixing the root-cause.

Thanks in advance,
Regards,
Satish Bellapu.
 
reply
    Bookmark Topic Watch Topic
  • New Topic