본문 바로가기

서버운영 (TA, ADMIN)/인프라

Caused by: java.sql.SQLException: null, message from server: "Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug"

Caused by: org.apache.commons.dbcp.SQLNestedException: Error preloading the connection pool

        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1398) ~[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 b612cam.infrastructure.deprecated.datasource.DataSourceInitializer.<init>(DataSourceInitializer.java:15) ~[b612cam-api-1.0.0-SNAPSHOT.jar:na]

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]

        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]

        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]

        ... 17 common frames omitted

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_131]

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_131]

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]

        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]

        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.Util.getInstance(Util.java:387) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:917) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2165) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2090) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at sun.reflect.GeneratedConstructorAccessor40.newInstance(Unknown Source) ~[na:na]

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_131]

        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_131]

        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        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.addObject(GenericObjectPool.java:1617) ~[commons-pool-1.5.4.jar:1.5.4]

        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1395) ~[commons-dbcp-1.4.jar:1.4]

        ... 24 common frames omitted

Caused by: java.sql.SQLException: null,  message from server: "Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug"

        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1038) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2255) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2106) ~[mysql-connector-java-5.1.38.jar:5.1.38]

        ... 37 common frames omitted


http://gywn.net/2012/10/mysql-connection-limitation-nproc/