You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to log4jdbc
After i plugged log4jdbc into my connections, i started to see these
messages in the error logs:
"2012-02-01 09:51:00 - ERROR ajp-8009-9 jdbc.sqltiming - 10.
Connection.setAutoCommit(false)
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last
packet successfully received from the server was 55,923,403
milliseconds ago. The last packet sent successfully to the server was
55,923,415 milliseconds ago. is lonn
ger than the server configured value of 'wait_timeout'. You should
consider either expiring and/or testing connection validity before use
in your application, increasing the server configured values for
client timeouts, or using thee
Connector/J connection property 'autoReconnect=true' to avoid
this problem."
It basically repeats these messages in different classes:
jdbc.sqlonly, jdbc.sqltiming and jdbc.audit.
I already have autoReconnect set to true. I suspect the problem is
that log4jdbc is not respecting testOnBorrow=”true”
validationQuery=”select 1″
1/ Why did this error stop appearing after i enabled log4jdbc
2/ How can i avoid printing duplicate error messages
After i plugged log4jdbc into my connections, i started to see these
messages in the error logs:
All connection properties are passed verbatim to the real driver.
I've no idea why that is occurring. It is possible that this was already occurring anyway, but the application was just suppressing the exception. log4jdbc gets and logs the exception before the application does, so if the application is not showing you certain exceptions, log4jdbc can show them to you anyway. I ran into this type of scenario in a different context before and I had to add a special option to make log4jdbc suppress certain kinds of exceptions.
rvelosoo
unread,
Feb 2, 2012, 1:59:53 AM2/2/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to log4jdbc
mmm, shouldnt i see the "select 1" validation queries in the logs as
well? How can i avoid the triple logging of this exception? since i
only need jdbc.sqltiming, im setting the other log levels to FATAL to
supress the log mesg. Also, how can i suppress the logging of this
exception only? (that would be the best)