Getting rid of SocketException: Broken pipe with Quartz and MySQL on JBoss

If you’re using Quartz on JBoss and configured the full Quartz package (with database scheduled jobs) instead of the lightweight in memory Quartz bundled with the vanilla installation of JBoss, you’ll certainly encounter the problem of
MESSAGE: Broken pipe

STACKTRACE: Broken pipe
at Method)
at com.mysql.jdbc.MysqlIO.send(
at com.mysql.jdbc.MysqlIO.sendCommand(

in your log files after eight hours of inactivity.

If you start googling, you’ll find hundreds of suggestions, such as appending autoreconnect=true to the datasource URL in your quartz-ds.xml, whihc as such is important, but unfortunately wont solve the problem. The solution is described in this excellent post: Applied to our configuration, you’ll need to add the following lines to your quart-service.xml:

org.quartz.dataSource.QUARTZ_NO_TX.validateOnCheckout = true
org.quartz.dataSource.QUARTZ_NO_TX.validationQuery = select 1

If you’re looking on guidance to install Quartz with database support on JBoss, check this post:

This entry was posted in Distributed Computing, Enterprise Java. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s