SQL error, connections not being closed? #104


  • New
  • Defect
Open
Assigned to _ForgeUser4509640
  • _ForgeUser6835820 created this issue Dec 20, 2011

    Been testing this plugin today, suddenly started spamming errors:

    http://pastie.org/3045791

  • _ForgeUser6835820 added the tags New Defect Dec 20, 2011
  • _ForgeUser6835820 posted a comment Dec 20, 2011

    Server ran OOM and started swapping. Had to disable plugin for now, most likely there is an issue with the handling of SQL, seen this before in plugins, most recently in Hawkeye. Was fixed in there only a few days ago.

  • _ForgeUser6835820 posted a comment Dec 20, 2011

    One of our devs had a look at the code:

    [18:10] <%Devdude> it's sql code literally just uses the sql objects but never closes them [18:11] <%Devdude> all connections, statements and resultsets should be close()'d but none of them ever are

    So that would be it, same issue as Hawkeye had :P

  • _ForgeUser4509640 posted a comment Dec 20, 2011

    Thing is we are now using multiple threads, which could each run at pretty much any time. But if one is still running (and with an open mysql connection) and a new thread tries to open another one, it will die horribly.

    So we were testing just opening it when the plugin loads and close when the plugin stops. (Someone else's code not mine, hadn't noticed that get changed) However this seems a silly way of doing it too.

    We will have to experiment where it is best to open and close. It is good to open and close as often as possible (to a reasonable extent) however if another tries to open before the previous has closed there will be problems....


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