Nate Suchan

Greenhorn
+ Follow
since Jan 10, 2017
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nate Suchan

Note: Sorry in advance, this is my first time posting a question on this site

So the high level view, I'm using execute() in Java to run a INSERT statement. The statement is bouncing off quite a large table. Sometimes 8+ millions rows are being inserted and i'm using my CPU to run it.
Normally the execution time is around 50 minutes.

So now the problem.

In MYSQL, the table i'm inserting into does get populated with data (all of it). But, when I go to SELECT from that table, MYSQL shoots a error message -- Error Code: 2013: Lost Connection to MYSQL server during query
I do not receive that error message until I try to query off the database.

Java however, keeps running and never throws an error.

Is there any error handling I can throw to let Java know that MYSQL connection has timed out?


5 years ago