This article address: http://blog.csdn.net/kongxx/article/details/7176961
A recent stress test on Vertica found that the following exception occurred when the number of concurrent requests reached 50 +
Com.vertica.util.PSQLException:FATAL:New session rejected due to limit, already-sessions active at Com.vertica.core. V3. Connectionfactoryimpl.readstartupmessages (Unknown Source) at Com.vertica.core.v3.ConnectionFactoryImpl.openConnectionImpl (Unknown Source) at Com.vertica.core.ConnectionFactory.openConnection (Unknown Source) at Com.vertica.jdbc2.AbstractJdbc2Connection. <init> (Unknown source) at com.vertica.jdbc3.abstractjdbc3connection.<init> (Unknown source) at Com.vertica.jdbc3g.jdbc3gconnection.<init> (Unknown Source) at Com.vertica.Driver.makeConnection (Unknown SOURCE) at Com.vertica.Driver.connect (Unknown source) at Org.apache.commons.dbcp.DriverConnectionFactory.createConnection (driverconnectionfactory.java:38) at Org.apache.commons.dbcp.PoolableConnectionFactory.makeObject (poolableconnectionfactory.java:582) at Org.apache.commons.pool.impl.GenericObjectPool.borrowObject (genericobjectpool.java:1181) at Org.apache.commons.dbcp.PoolingDataSource.getCOnnection (poolingdatasource.java:106) at Org.apache.commons.dbcp.BasicDataSource.getConnection ( basicdatasource.java:1044) at Dbutil.getconnection (dbutil.java:64) at Dbqueryperformancetest.query ( dbqueryperformancetest.java:46) at dbqueryperformancetest.access$000 (dbqueryperformancetest.java:14) at Dbqueryperformancetest$1.execute (dbqueryperformancetest.java:40) at Dbperformancetest.runit ( dbperformancetest.java:97) at Dbperformancetest$1.run (dbperformancetest.java:51) at Java.lang.Thread.run (
thread.java:619) Com.vertica.util.PSQLException:The connection attempt failed. At Com.vertica.core.v3.ConnectionFactoryImpl.openConnectionImpl (Unknown Source) at Com.vertica.core.ConnectionFactory.openConnection (Unknown Source) at Com.vertica.jdbc2.AbstractJdbc2Connection. <init> (Unknown source) at com.vertica.jdbc3.abstractjdbc3connection.<init> (Unknown source) at Com.vertica.jdbc3g.jdbc3gconnection.<init> (Unknown Source) at Com.vertica.Driver.makeConnection (Unknown SOurce) at Com.vertica.Driver.connect (Unknown Source) at Org.apache.commons.dbcp.DriverConnectionFactory.createConnection (driverconnectionfactory.java:38) at Org.apache.commons.dbcp.PoolableConnectionFactory.makeObject (poolableconnectionfactory.java:582) at Org.apache.commons.pool.impl.GenericObjectPool.borrowObject (genericobjectpool.java:1181) at Org.apache.commons.dbcp.PoolingDataSource.getConnection (poolingdatasource.java:106) at Org.apache.commons.dbcp.BasicDataSource.getConnection (basicdatasource.java:1044) at Dbutil.getconnection ( dbutil.java:64) at Dbqueryperformancetest.query (dbqueryperformancetest.java:46) at dbqueryperformancetest.access$ (dbqueryperformancetest.java:14) at Dbqueryperformancetest$1.execute (dbqueryperformancetest.java:40) at Dbperformancetest.runit (dbperformancetest.java:97) at Dbperformancetest$1.run (dbperformancetest.java:51) at Java.lang.Thread.run (thread.java:619) caused by:java.net.SocketException:Connection reset at java.net.SocketInputStReam.read (socketinputstream.java:168) at Java.io.BufferedInputStream.fill (bufferedinputstream.java:218) at Java.io.BufferedInputStream.read (bufferedinputstream.java:237) at Com.vertica.core.PGStream.ReceiveChar (Unknown SOURCE) at Com.vertica.core.v3.ConnectionFactoryImpl.doAuthentication (Unknown source) ...
More
This problem occurs because the Maxclientsessions parameter is specified in Vertica, and this value can be modified by using the following SQL
SELECT set_config_parameter (' maxclientsessions ', 250);