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?

  • 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, 2012 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, 2012 at 14:54

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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