Hey I’m not sure if this is covered anywhere but I didnt see it in the first few pages of posts.
So I have my rancher master setup with a single host provisioned. On the host I have deployed a redis container, a memcache container, and a php application container with service links to those.
Lastly I have a rancher load balancer container in front of my php application, to assist with rolling service upgrades.
I have noticed that every time I visit the web url of my php application, the rancher master server is spammed with db connection errors. The logs suggest that it is failing to connect to the same db instance I am using for the rancher db itself, which seems strange if it is getting the connections from the same pool.
To be clear this is in the logs on the rancher master, not on the container host that I have provisioned. This could be a huge limiting factor in using rancher if, under load it it constantly communicating with the master and incurring database queries.
I hope I have just set something up poorly.
Here is an example from the log files on the rancher master, this happens on every single page view to my deployed php application:
2015-08-26 17:12:55,001 ERROR [:] [] [] [] [cutorService-18] [o.a.c.m.context.NoExceptionRunnable ] Uncaught exception org.jooq.exception.DataAccessException: SQL [select process_instance
.id
, process_instance
.start_time
, process_instance
.end_time
, process_instance
.data
, process_instance
.priority
, process_instance
.process_name
, process_instance
.resource_type
, process_instance
.resource_id
, process_instance
.result
, process_instance
.exit_reason
, process_instance
.phase
, process_instance
.start_process_server_id
, process_instance
.running_process_server_id
from process_instance
where process_instance
.id
= ?]; Could not connect to ################.us-east-1.rds.amazonaws.com:3306 : Connection timed out
at org.jooq.impl.Utils.translate(Utils.java:1287) ~[jooq-3.3.0.jar:na]
at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:495) ~[jooq-3.3.0.jar:na]
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:326) ~[jooq-3.3.0.jar:na]
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:351) ~[jooq-3.3.0.jar:na]
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:341) ~[jooq-3.3.0.jar:na]
at org.jooq.impl.AbstractResultQuery.fetchOne(AbstractResultQuery.java:470) ~[jooq-3.3.0.jar:na]
at org.jooq.impl.SelectImpl.fetchOne(SelectImpl.java:2372) ~[jooq-3.3.0.jar:na]
at io.cattle.platform.engine.manager.impl.jooq.JooqProcessRecordDao.getRecord(JooqProcessRecordDao.java:91) ~[cattle-iaas-engine-jooq-0.5.0-SNAPSHOT.jar:na]
at io.cattle.platform.engine.eventing.impl.ProcessEventListenerImpl.shouldWaitLonger(ProcessEventListenerImpl.java:98) ~[cattle-framework-engine-0.5.0-SNAPSHOT.jar:na]
at io.cattle.platform.engine.eventing.impl.ProcessEventListenerImpl.processExecute(ProcessEventListenerImpl.java:56) ~[cattle-framework-engine-0.5.0-SNAPSHOT.jar:na]
at sun.reflect.GeneratedMethodAccessor770.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_79]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_79]
at io.cattle.platform.eventing.annotation.MethodInvokingListener$1.doWithLockNoResult(MethodInvokingListener.java:76) ~[cattle-framework-eventing-0.5.0-SNAPSHOT.jar:na]
at io.cattle.platform.lock.LockCallbackNoReturn.doWithLock(LockCallbackNoReturn.java:7) ~[cattle-framework-lock-0.5.0-SNAPSHOT.jar:na]
at io.cattle.platform.lock.LockCallbackNoReturn.doWithLock(LockCallbackNoReturn.java:3) ~[cattle-framework-lock-0.5.0-SNAPSHOT.jar:na]
at io.cattle.platform.lock.impl.AbstractLockManagerImpl$3.doWithLock(AbstractLockManagerImpl.java:40) ~[cattle-framework-lock-0.5.0-SNAPSHOT.jar:na]
at io.cattle.platform.lock.impl.LockManagerImpl.doLock(LockManagerImpl.java:33) ~[cattle-framework-lock-0.5.0-SNAPSHOT.jar:na]
at io.cattle.platform.lock.impl.AbstractLockManagerImpl.lock(AbstractLockManagerImpl.java:13) ~[cattle-framework-lock-0.5.0-SNAPSHOT.jar:na]
at io.cattle.platform.lock.impl.AbstractLockManagerImpl.lock(AbstractLockManagerImpl.java:37) ~[cattle-framework-lock-0.5.0-SNAPSHOT.jar:na]
at io.cattle.platform.eventing.annotation.MethodInvokingListener.onEvent(MethodInvokingListener.java:72) ~[cattle-framework-eventing-0.5.0-SNAPSHOT.jar:na]
at io.cattle.platform.eventing.impl.AbstractThreadPoolingEventService$2.doRun(AbstractThreadPoolingEventService.java:135) ~[cattle-framework-eventing-0.5.0-SNAPSHOT.jar:na]
at org.apache.cloudstack.managed.context.NoExceptionRunnable.runInContext(NoExceptionRunnable.java:13) ~[cattle-framework-managed-context-0.5.0-SNAPSHOT.jar:na]
at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49) [cattle-framework-managed-context-0.5.0-SNAPSHOT.jar:na]
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55) [cattle-framework-managed-context-0.5.0-SNAPSHOT.jar:na]
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:108) [cattle-framework-managed-context-0.5.0-SNAPSHOT.jar:na]
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52) [cattle-framework-managed-context-0.5.0-SNAPSHOT.jar:na]
at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46) [cattle-framework-managed-context-0.5.0-SNAPSHOT.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
Caused by: java.sql.SQLNonTransientConnectionException: Could not connect to ##############.us-east-1.rds.amazonaws.com:3306 : Connection timed out
at org.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:136) ~[mariadb-java-client-1.1.7.jar:na]
at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106) ~[mariadb-java-client-1.1.7.jar:na]
at org.mariadb.jdbc.Driver.connect(Driver.java:114) ~[mariadb-java-client-1.1.7.jar:na]
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188) ~[commons-pool-1.6.jar:1.6]
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) ~[commons-dbcp-1.4.jar:1.4]
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[commons-dbcp-1.4.jar:1.4]
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111) ~[spring-jdbc-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:224) ~[spring-jdbc-3.2.4.RELEASE.jar:3.2.4.RELEASE]
at com.sun.proxy.$Proxy55.prepareStatement(Unknown Source) ~[na:na]
at org.jooq.impl.ProviderEnabledConnection.prepareStatement(ProviderEnabledConnection.java:112) ~[jooq-3.3.0.jar:na]
at org.jooq.impl.SettingsEnabledConnection.prepareStatement(SettingsEnabledConnection.java:76) ~[jooq-3.3.0.jar:na]
at org.jooq.impl.AbstractResultQuery.prepare(AbstractResultQuery.java:230) ~[jooq-3.3.0.jar:na]
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:296) ~[jooq-3.3.0.jar:na]
… 28 common frames omitted
Caused by: org.mariadb.jdbc.internal.common.QueryException: Could not connect to ##############.us-east-1.rds.amazonaws.com:3306 : Connection timed out
at org.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(MySQLProtocol.java:677) ~[mariadb-java-client-1.1.7.jar:na]
at org.mariadb.jdbc.internal.mysql.MySQLProtocol.(MySQLProtocol.java:266) ~[mariadb-java-client-1.1.7.jar:na]
at org.mariadb.jdbc.Driver.connect(Driver.java:110) ~[mariadb-java-client-1.1.7.jar:na]
… 40 common frames omitted
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.7.0_79]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) ~[na:1.7.0_79]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) ~[na:1.7.0_79]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) ~[na:1.7.0_79]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.7.0_79]
at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_79]
at java.net.Socket.connect(Socket.java:528) ~[na:1.7.0_79]
at org.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(MySQLProtocol.java:372) ~[mariadb-java-client-1.1.7.jar:na]
at org.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(MySQLProtocol.java:673) ~[mariadb-java-client-1.1.7.jar:na]
… 42 common frames omitted