You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rajesh <ra...@gkbcinc.com> on 2004/08/16 08:14:39 UTC

Connection and Tomcat server

Hai guys

    am still fasing same problem with my struts,tomcat with mysql.

am working in the environment of tomcat,struts,dbcp,JP2, mysql..

i developed a site of round 20-50 actions which accesses db through DBCP 
to MySQL

i completely debugged my site theroughly, there is no but in my code.

i uploaded the site to net, after a using the site successfully suddenly 
my connections is not working .

i found this by my index page where i am using 2 message board which 
takes top 5 records from db and displays it in text scrolling javascript

where ever am connection to mysql through getDataSource(request)  am not 
gettign connection properly.

i am properly closing connection in my program

but when i restart my tomcat then my program start working properlty 
then after a day or so the same problem arrice.

can anybody help me to overcome this.

am fasing the same problem for many days.

thanks  you
Rajesh

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Connection and Tomcat server

Posted by Jignesh Patel <jp...@bangtechnology.com>.
I can say, this is purely a connection closing problem.

That's the reason when you restart the tomcat it works fine till the
time all the connection in the connection pool utilize and then after it
hangs.

Are u closing your connection in finally block?

-Jignesh
On Mon, 2004-08-16 at 02:14, Rajesh wrote:
> Hai guys
> 
>     am still fasing same problem with my struts,tomcat with mysql.
> 
> am working in the environment of tomcat,struts,dbcp,JP2, mysql..
> 
> i developed a site of round 20-50 actions which accesses db through DBCP 
> to MySQL
> 
> i completely debugged my site theroughly, there is no but in my code.
> 
> i uploaded the site to net, after a using the site successfully suddenly 
> my connections is not working .
> 
> i found this by my index page where i am using 2 message board which 
> takes top 5 records from db and displays it in text scrolling javascript
> 
> where ever am connection to mysql through getDataSource(request)  am not 
> gettign connection properly.
> 
> i am properly closing connection in my program
> 
> but when i restart my tomcat then my program start working properlty 
> then after a day or so the same problem arrice.
> 
> can anybody help me to overcome this.
> 
> am fasing the same problem for many days.
> 
> thanks  you
> Rajesh
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Connection and Tomcat server

Posted by Jignesh Patel <jp...@bangtechnology.com>.
I can say, this is purely a connection closing problem.

That's the reason when you restart the tomcat it works fine till the
time all the connection in the connection pool utilize and then after it
hangs.

Are u closing your connection in finally block?

-Jignesh
On Mon, 2004-08-16 at 02:14, Rajesh wrote:
> Hai guys
> 
>     am still fasing same problem with my struts,tomcat with mysql.
> 
> am working in the environment of tomcat,struts,dbcp,JP2, mysql..
> 
> i developed a site of round 20-50 actions which accesses db through DBCP 
> to MySQL
> 
> i completely debugged my site theroughly, there is no but in my code.
> 
> i uploaded the site to net, after a using the site successfully suddenly 
> my connections is not working .
> 
> i found this by my index page where i am using 2 message board which 
> takes top 5 records from db and displays it in text scrolling javascript
> 
> where ever am connection to mysql through getDataSource(request)  am not 
> gettign connection properly.
> 
> i am properly closing connection in my program
> 
> but when i restart my tomcat then my program start working properlty 
> then after a day or so the same problem arrice.
> 
> can anybody help me to overcome this.
> 
> am fasing the same problem for many days.
> 
> thanks  you
> Rajesh
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Connection and Tomcat server

Posted by David Smith <dn...@cornell.edu>.
Sounds like the connections in the pool are timing out.  The mysql 
server will only keep them around for about 8 hours or so before closing 
them.  Have you tried tacking the following onto the end of your 
database url:

?autoReconnect=true

--David

Rajesh wrote:

> Hai guys
>
>    am still fasing same problem with my struts,tomcat with mysql.
>
> am working in the environment of tomcat,struts,dbcp,JP2, mysql..
>
> i developed a site of round 20-50 actions which accesses db through 
> DBCP to MySQL
>
> i completely debugged my site theroughly, there is no but in my code.
>
> i uploaded the site to net, after a using the site successfully 
> suddenly my connections is not working .
>
> i found this by my index page where i am using 2 message board which 
> takes top 5 records from db and displays it in text scrolling javascript
>
> where ever am connection to mysql through getDataSource(request)  am 
> not gettign connection properly.
>
> i am properly closing connection in my program
>
> but when i restart my tomcat then my program start working properlty 
> then after a day or so the same problem arrice.
>
> can anybody help me to overcome this.
>
> am fasing the same problem for many days.
>
> thanks  you
> Rajesh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org