Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Tomcat hangs due concurrent db-queries

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have Tomcat5.5 running on virtual server(Debian). Tomcat hangs when I make to two/more concurrent heavy-db-using http-request with browser. By hanging I mean that tomcat accepts new http-requests but does not reply to them anymore. Db-query that tomcat executes is select that returns many rows(just to make sure they executes concurrently) but otherwise it is very simple.

When tomcat hangs one tomcat(java) process start slowly increasing cpu-usage(eventually to 99%). Tomcat cannot be terminated by "kill -3" signal.

I have tested this with Postgresql and mysql, direct JDBC connection/hibernate, pooling/no pooling. Pure java-application(no Tomcat) works fine with many concurrent queries.


All ideas are very welcome, thanks
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The obvious question is - how does your servlet manage DB connections? Are you using a connection pool?

Bill
 
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic