• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Java app on Tomcat return "Network Error (tcp_error)" error

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've recently deployed a java application to an shared Apache / Tomcat server with MySQL as a backend database.
It's a UNIX server.
Tomcat version is 5.5
It uses mod_jk:


The Application is structured with: Struts2 with Spring and Hibernate integration.

Whenever I try to open a page
1) it takes too long (2-3 minutes!) to open a single page (even the most static ones, I mean even the page which is just a Struts Action execute without anything else)

2) The page stops working with following error appear on the browser screen:


The frequency of happening of the second thing is something like 90%!

I could only access catalina.out and there were not anything related to the runtime error or exception. In access.log the response code, almost everytime, was 200 but it wasn't corresponded to the browsing situation.

I even tested the site in Lynx as well, which the same thing was occured there as well.

I've searched about the above error and had not come to any resolution.
I'd really appreciate if anyone could help me find out what's going on!

Regards,
Khosrow.
 
Saloon Keeper
Posts: 24565
168
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My best guess is that you're timing out due to failure of the web application to respond within the allowable interval. Most likely either the application code itself is doing something that takes a long time or it's making a database request that takes a long time to complete.

Just to rule out problems with your pipleline, bypass Apache and access the app directly through Tomcat (or whatever J2Ee server you're using).
 
Khosrow Moossavi
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Tim,

Thanks for the reply. The application structure is like this:

applicationContext-hibernate.xml


spring-hibernate-actions.xml


spring-hibernate-services.xml


spring-hibernate-daos.xml


FirstDAOImpl.java


Is this a correct way? or even an accurate one? Should I close something that I'm not aware of right now?
And by the way, what did you mean by "bypass Apache and access the app directly through Tomcat ". How can I do that?

Regards,
Khosrow.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic