Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL exceptions when the bot is idle. #40

Closed
FauxFaux opened this issue Aug 22, 2011 · 4 comments
Closed

SQL exceptions when the bot is idle. #40

FauxFaux opened this issue Aug 22, 2011 · 4 comments

Comments

@FauxFaux
Copy link
Member

Benji has got these; I have reproduced them. Here's one now!

{{{
1131364418576 :Vilers!james@82.153.100.143 QUIT :ChatZilla 0.9.68.6 [XULRunner 1.7+/2005082009]
Ack! SQL Exception: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **
java.io.EOFException

STACKTRACE:

java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1902)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2348)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2858)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1570)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2972)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2902)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:822)
at com.mchange.v2.c3p0.impl.NewProxyStatement.executeQuery(NewProxyStatement.java:35)
at org.uwcs.choob.support.ObjectDBTransaction.retrieve(ObjectDBTransaction.java:158)
at org.uwcs.choob.modules.ObjectDbModule.retrieve(ObjectDbModule.java:64)
at plugins.Seen.Seen.getSeen(Seen.java:136)
at plugins.Seen.Seen.onQuit(Seen.java:227)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.uwcs.choob.plugins.HaxSunPluginManager$2.run(HaxSunPluginManager.java:404)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)

** END NESTED EXCEPTION **

Last packet sent to the server was 1 ms ago.
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1902)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2348)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2858)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1570)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2972)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2902)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:822)
at com.mchange.v2.c3p0.impl.NewProxyStatement.executeQuery(NewProxyStatement.java:35)
at org.uwcs.choob.support.ObjectDBTransaction.retrieve(ObjectDBTransaction.java:158)
at org.uwcs.choob.modules.ObjectDbModule.retrieve(ObjectDbModule.java:64)
at plugins.Seen.Seen.getSeen(Seen.java:136)
at plugins.Seen.Seen.onQuit(Seen.java:227)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.uwcs.choob.plugins.HaxSunPluginManager$2.run(HaxSunPluginManager.java:404)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)

** END NESTED EXCEPTION **

Last packet sent to the server was 1 ms ago.
Last packet sent to the server was 1 ms ago.
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2560)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2858)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1570)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2972)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2902)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:822)
at com.mchange.v2.c3p0.impl.NewProxyStatement.executeQuery(NewProxyStatement.java:35)
at org.uwcs.choob.support.ObjectDBTransaction.retrieve(ObjectDBTransaction.java:158)
at org.uwcs.choob.modules.ObjectDbModule.retrieve(ObjectDbModule.java:64)
at plugins.Seen.Seen.getSeen(Seen.java:136)
at plugins.Seen.Seen.onQuit(Seen.java:227)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.uwcs.choob.plugins.HaxSunPluginManager$2.run(HaxSunPluginManager.java:404)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Exception invoking method public void plugins.Seen.Seen.onQuit(org.uwcs.choob.support.events.QuitEvent) throws org.uwcs.choob.support.ChoobException
An SQL exception occurred while processing this operation.
at org.uwcs.choob.support.ObjectDBTransaction.sqlErr(ObjectDBTransaction.java:122)
at org.uwcs.choob.support.ObjectDBTransaction.retrieve(ObjectDBTransaction.java:291)
at org.uwcs.choob.modules.ObjectDbModule.retrieve(ObjectDbModule.java:64)
at plugins.Seen.Seen.getSeen(Seen.java:136)
at plugins.Seen.Seen.onQuit(Seen.java:227)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.uwcs.choob.plugins.HaxSunPluginManager$2.run(HaxSunPluginManager.java:404)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
}}}

@FauxFaux
Copy link
Member Author

Author: bucko
I have committed a chance in [322] - idle connections are now checked periodically.

@FauxFaux
Copy link
Member Author

Author: bucko
If my change doesn't work, C3P0 provides setTestConnectionOnCheckout(true) instead.

Note that the actual bug can be easily reproduced using "mysqladmin processlist" then "mysqladmin kill" followed by a comma-seperated list of processes.

Or if you're l33t, have Perl and mysqladmin and have a .my.cnf set up properly:

{{{
mysqladmin kill mysqladmin processlist|perl -ne '/\|\s+(\d+)\s+.*choob/ && print "$1,"; END{print"0\n"}'
}}}

@FauxFaux
Copy link
Member Author

Author: faux
Seems to be fixed, woot.

@FauxFaux
Copy link
Member Author

Ticket imported from Trac:
http://trac.uwcs.co.uk/choob/ticket/40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant