Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

any known large table issues with DBCP? 2

Status
Not open for further replies.

developerinlondon

Programmer
Jan 11, 2003
196
GB
i seem to be getting a strange problem using the DBCP connnection pool. When I try to run a query on a certain large table (5.8million records, 28.5GB) the JDBC seems to just quietly not run the query without throwing any exceptions/errors.
Does anyone know how I might be able to find out whats going on and if there is a remedy?
I am using mysql 5 with an InnoDB table.

 
Can you run the query successfully from a standalone test class (without DBCP) ?

--------------------------------------------------
Free Database Connection Pooling Software
 
I changed the RemoveAbandonedTimeout to 300000 (from default 300 which seems to timeout in 300 ms rather then 300 seconds as documented) and now the servlet is running for a long time, it seems its now going to wait for 300 minutes (which is still too long to do an insert query).
 
Can you run it from a Java standalone test class ? (Not PHP or MySQL prompt) - this is how you debug stuff. Break each bit down into its component parts until you find out what is going on.

At the moment you suspect DBCP - so the way to debug this is to take DBCP out of the equation and un a standalone Java app.

--------------------------------------------------
Free Database Connection Pooling Software
 
I was more thinking along the lines of testing your query without DBCP - eg :

Code:
import java.sql.*;

public class Test {
	public static void main(String args[]) throws Exception {
		String driverClass = "enter_your_driver_name";
		String driverURL = "enter_your_db_url_here";
		String user = "user";
		String password = "password";
		
            	Class.forName(driverClass);
            	Connection conn = DriverManager.getConnection(driverURL, user, password);
            	
            	// Add your query details here
            	Statement s = conn.createStatement();
            	...
            	...
            	
            	conn.close();
	}
}

--------------------------------------------------
Free Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top