File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes my apache-tomcat webserver gets down time to time at very short intervals Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "my apache-tomcat webserver gets down time to time at very short intervals" Watch "my apache-tomcat webserver gets down time to time at very short intervals" New topic
Author

my apache-tomcat webserver gets down time to time at very short intervals

AnupKumar Tripathi
Greenhorn

Joined: Dec 07, 2009
Posts: 4
our website is fameboxx.com. its up and a social networking site with a no.of modules(19 modules) having many tables(116 tables) and a single database.

the website gets down time to time at very short intervals. we want to get rid of this problem ASAP.

the server guys say, there is some problem in code.they are saying that mysql connections are not properly closed. while its not true. we have closed the connections on each pages and reopen when they need.

i m in great trouble , please help !
thanks in advance !!!
Ad Rajesh
Greenhorn

Joined: Apr 25, 2006
Posts: 21
Hi, What version of tomcat your are using?


SCJP 1.4
SCWCD 5.0
AnupKumar Tripathi
Greenhorn

Joined: Dec 07, 2009
Posts: 4
Ad Rajesh wrote:Hi, What version of tomcat your are using?



we are using Apache tomcat 2.something.. not so clear ! you took interest in my question so thanks for this !! hope you will solve my problem ! please help !! Thanks in advance for it..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60992
    
  65

Tomcat 2? Or something? I don't think so!

If you are not going to provide any details, no one will be able to help you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60992
    
  65

P.S. You should be user container-managed connection pooling. Manually managing the connectionz is almost always a recipe for disaster.
AnupKumar Tripathi
Greenhorn

Joined: Dec 07, 2009
Posts: 4
Bear Bibeault wrote:P.S. You should be user container-managed connection pooling. Manually managing the connectionz is almost always a recipe for disaster.



i can tell you tomorrow the correct version of the tomcat we are using,.
one thing more .. i m using a connection object on every page and closing the connection properly after page seizes to exist. for this i have made a simpe java program for connection and put its compiled(class file ) in classes directory of WEB-INF . i just create object of this class for establishing the connection. And while i know java does garbage collection for the objects used on a page when it gets unused further( when we switch from one page to another),,,, i have manually nullified each of the objects used on the page..
Thus i have done my best to overcome such saturation i m suffering with..
And most importantly as sever gets down and we make it restart by requesting from sever guys for it.. it gets well and behaves as it was never down. i mean , then it stats working very good.. but after some time .. it gets down again.
thanks again of your responses .. please help me by your further suggestion .and as you said we should use the connection pooling . please guide about connection pooling in java n provide the code for the connection pooling in java .. i would be very graceful to you.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60992
    
  65

Setting up Tomcat connection pooling has been covered in this forum before. Search back for details...
AnupKumar Tripathi
Greenhorn

Joined: Dec 07, 2009
Posts: 4
Bear Bibeault wrote:Setting up Tomcat connection pooling has been covered in this forum before. Search back for details...


could you please justify how is the Approach i m using , is wrong..? please dont mind , i just want to know the stories behind its failure if it is..

And please tell me.. why does the whole server (the web server) get down only by unoptimized use of the mysql connection?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: my apache-tomcat webserver gets down time to time at very short intervals