Plugin does not reconnect to database after connection timeout is reached #82


  • New
  • Defect
Open
Assigned to _ForgeUser2779866
  • _ForgeUser9422455 created this issue Aug 17, 2012

    First, thanks for this great plugin.

    Now to the problem:
    I'm running a very low frequented server. Statistician works fine after a server restart. But if there is no user online for some time, MySQL closes the connection (connection timeout reached). If a user logs in then, I get the following error:

    14:32:59 [WARNING] [Statistician] SELECT player_name FROM players WHERE uuid = '52e1acc5-633b-4ebc-8cae-67ea3ba88e26' LIMIT 1 :: Query failed, checking connection... (The last packet successfully received from the server was 53'449'352 milliseconds ago.  The last packet sent successfully to the server was 53'449'352 milliseconds ago. is longer 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 the Connector/Jconnection property 'autoReconnect=true' to avoid this problem.)

    After that error, it works until no user is online and the timeout is reached again.

    So, I have  increased the wait_timout value in MySQL. But I think it would be better to check if the connection is still available, and reconnect if neccessary.

    Thanks

  • _ForgeUser9422455 added the tags New Defect Aug 17, 2012
  • _ForgeUser2779866 unassigned issue from _ForgeUser6869524 Aug 17, 2012
  • _ForgeUser2779866 self-assigned this issue Aug 17, 2012
  • _ForgeUser3296271 posted a comment Aug 20, 2012

    I also have this issue, and would greatly appreciate a solution or fix!

    Thank you.

  • Iomega0318 posted a comment Aug 24, 2012

    Yeah me too, a quick way to fix it is to log on then off then back on and it works fine after that until you stay disconnected for to long again lol..

    Anyone know any other ways to fix it? Perhaps a persistent connection in MySQL?


To post a comment, please login or register a new account.