# Problems with DB connection

**URL:** <https://forum.inductiveautomation.com/t/problems-with-db-connection/34879>\
**Category:** Ignition\
**Created:** [May 19, 2020, 3:00pm UTC](https://forum.inductiveautomation.com/t/problems-with-db-connection/34879 "2020-05-19T15:00:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcelo.burstein](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@marcelo.burstein](https://forum.inductiveautomation.com/u/marcelo.burstein)\
**Post date:** [May 19, 2020, 3:00pm UTC](https://forum.inductiveautomation.com/t/problems-with-db-connection/34879/1 "2020-05-19T15:00:09Z")

</div>

Hi all,

I’m having issues with my DB connection and Ignition. I have 2 DB connections db\_energia and db\_energia\_hist. Recently, the DB connection with db\_energia started to have connecton problems.

Here is part of the log console message

INFO | jvm 4 | 2020/05/19 10:09:28 | ERROR [db\_energia] [10:09:27,782]: Database connection FAULTED.  
INFO | jvm 4 | 2020/05/19 10:09:28 | org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnectionInternal(DatasourceImpl.java:199)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl.getConnectionImpl(DatasourceManagerImpl.java:131)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnection(DatasourceImpl.java:194)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl.getConnection(DatasourceManagerImpl.java:116)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at com.inductiveautomation.ignition.gateway.script.GatewayDBUtilities.getConnection(GatewayDBUtilities.java:66)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.AbstractDBAction.invoke(AbstractDBAction.java:60)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:345)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at com.inductiveautomation.ignition.gateway.bootstrap.MapServlet.service(MapServlet.java:85)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:837)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.server.Server.handle(Server.java:518)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at java.lang.Thread.run(Unknown Source)  
INFO | jvm 4 | 2020/05/19 10:09:28 | Caused by: java.util.NoSuchElementException: Timeout waiting for idle object  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:958)  
INFO | jvm 4 | 2020/05/19 10:09:28 | at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)  
INFO | jvm 4 | 2020/05/19 10:09:28 | … 34 more

The thing is that db\_energia\_hist is working just fine and both connections are pointing to the same DB. Does anyone had a similar problem? Before this problem my connection between Ignition and MySQL5.6 was just fine.

Thanks

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [May 19, 2020, 3:03pm UTC](https://forum.inductiveautomation.com/t/problems-with-db-connection/34879/2 "2020-05-19T15:03:23Z")

</div>

What is the max number of connections? What is your innodb buffer pool size?

---

<div class="post-metadata">

**Author:** ![marcelo.burstein](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@marcelo.burstein](https://forum.inductiveautomation.com/u/marcelo.burstein)\
**Post date:** [May 19, 2020, 3:42pm UTC](https://forum.inductiveautomation.com/t/problems-with-db-connection/34879/3 "2020-05-19T15:42:45Z")

</div>

the innodb\_buffer\_pool\_size is 846200832
