MySQL - Too many connections

Help
2014-07-03
2014-08-25
  • Marco Tinazzi

    Marco Tinazzi - 2014-07-03

    Hi,
    we have a problem with Symmetric on MySQL, this is what happened:
    We had e server node with some batches (no more than 15-20 and mostly heartbeats) pending for a node that was offline. Once the node has been connected all batches were sent but MySQL went into 'Too many connections' error (more than 151 connections). After restarting symmetric service all came back to normality.
    The strange thing is that symmetric was configured as follows (conf/symmetric.properties) and for what i understand it shouldn't open more than 15 connections. Am i wrong? The application running on client nodes (a selling application) takes no more than 10-15 connections.

    db.pool.initial.size=5
    db.pool.max.active=15
    db.pool.max.idle=5
    db.pool.min.idle=5
    http.concurrent.workers.max=8

    Forgot to mention: All symmetric engines are running on same server. There are 2 client nodes and a server one.

    Thanks,
    Marco Tinazzi

     
    Last edit: Marco Tinazzi 2014-07-03
  • Chris Henson

    Chris Henson - 2014-07-07

    You are correct in that SymmetricDS should not use more than 15 connections. Was there anything suspicious going on in your log file?

     
  • Marco Tinazzi

    Marco Tinazzi - 2014-07-08

    Hi, this is the log in the moment i connected the node.

    http://pastebin.com/9dcamnrU

    Seems normal to me, except for the "too many connections" error.

    Any advice?
    Thank you

     
  • Ambrogio Porta

    Ambrogio Porta - 2014-08-14

    We had the same problem few days ago with almost the same situation.
    The slave nodes where unreachable for a network fault (the slaves have been offline for about 8 hours), once we resolved the problem on slave PCs (symmetric was still running on master PC) the databases have become unreachable (too many connections). Rebooting symmetric resolved the problem.

    Our symmetric.properties file have the same configuration as Marco, in normal conditions Symmetric does its work with no problems and it uses 9-10 connections.

    Why does Symmetric use all available MySQL connections when recovering from a network fault? And how can we resolve this problem?

    Thanks

     
  • Chris Henson

    Chris Henson - 2014-08-14

    Thanks for the detailed description. I think I recognize this issue.

    I think this is related to this:
    https://issues.apache.org/jira/browse/DBCP-342

    I have a patch from several years ago, that I will apply to SymmetricDS that will go in 3.6.6.

     
    • Ambrogio Porta

      Ambrogio Porta - 2014-08-14

      Hi,
      Thanks for the quick response.

      Do you have any idea how we can get around the problem?

      Thanks,
      Ambrogio.

       
  • Ambrogio Porta

    Ambrogio Porta - 2014-08-14

    Ok Thanks..
    I'm curious to see if i resolve ...

    I'm sorry but i don't understand what to do.. do I have to put the class file in the patches (org/jumpmind/db/util) folder of Symmetric? Or should I update the whole Jar file (Symmetric-jdbc-3.6.6-SNAPSHOT.jar)?

    Thanks,
    Ambrogio.

     
  • Chris Henson

    Chris Henson - 2014-08-14

    extract ResettableBasicDataSource.class from the jar file and put in the patches directory so you end up with:

    patches/org/jumpmind/db/util/ResettableBasicDataSource.class

    btw - what version of symmetricds are you running?

     
  • Ambrogio Porta

    Ambrogio Porta - 2014-08-14

    Hi Chris,
    We are running Symmetric 3.6.1

    Thanks

     
  • Chris Henson

    Chris Henson - 2014-08-14

    In that case, it would be pretty safe to just go ahead and do a complete upgrade to the snapshot (versus patching). Up to you ...

     
  • Ambrogio Porta

    Ambrogio Porta - 2014-08-14

    Ok,
    I try and then let you know

    Thanks Chris.

     
  • Ambrogio Porta

    Ambrogio Porta - 2014-08-14
    Post awaiting moderation.
  • Marco Tinazzi

    Marco Tinazzi - 2014-08-22

    Hi Chris,
    I'm not very confident about use this snapshot in a production environment, is it stable enough? Sorry if i ask, do you have any ETA for stable 3.6.6?

    Thanks again,
    Marco

     
  • Chris Henson

    Chris Henson - 2014-08-22

    The release of 3.6.6 will be early next week. The current snapshot (as of last night) should be stable enough to test with. All tests are passing.

     
  • Marco Tinazzi

    Marco Tinazzi - 2014-08-25

    Thank you vary much... I think we will wait for final release.

    Thanks again,
    Marco

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks