Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So we have a script(s) that runs in succession. Randomly this task would halt/freeze and error out simply because it did not see a returned response from the MySQL server saying the statement ran fine breaking the entire procedure. However when manually checking against the DB, the statements all ran fine it's just the script (using JBDC) aborted since it didn't see a response.

Nothing in the error logs, etc.

Is there a setting or reason why MySQL would be doing this? This is version 5.1 .

I thought of network issues causing this but this seems to happen in 2 different environments, both through a WAN and local LAN .

any ideas?

share|improve this question
What operating system is the script running on? What language is it written in? How long does it execute for? Are there any firewalls between the script host and database host (as this is the most likely culprit)? – Phil Apr 23 '12 at 14:50
Both on RHEL5.7 and Ubuntu10.04 servers running MySQL5.1 - issue's on both servers. NO firewalls on the LAN side (private network) , standard firewall (obviously with allows) on the WAN side when replicating this issue outside of the physical environment - these are .SQL statements - these scripts normally take a few seconds to execute. – Tom G Apr 23 '12 at 14:54

You can try setting up a shell script that runs the SQL scripts or write a program in perl/whatever language which tries to log the errors and return codes from MySQL. Otherwise it is very difficult to troubleshoot without knowing the errors.

You could also add SHOW ERRORS; and SHOW WARNINGS; to your SQL scripts, but I suspect the problem is not with your queries.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.