java - How to manage MySQL Connections properly? -


i working on server-application written in java. there 30 client requests per second, every request specific mysql table entry gets updated.

all server threads use single mysql connection, obtain singleton class. server thread creates statement , executes update query.

although close created statements after execution, server stops updating mysql table after hours.

what wrong? setup misconcept?

perhaps, connection closed due timeout. can make use of connection#isvalid in order verify whether or not connection still open.

you may take @ connection timeout drivermanager getconnection. there several tips listed.

also, may consider use of connection pool in code. apache commons place start.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -