Hi, all,
After I used xwiki for a while with POSTGRES database, I got Exception:
Could not create a DBCP pool. There is an error in the hibernate
configuration file, please review it
since it said " Cannot create PoolableConnectionFactory (FATAL: sorry, too
many clients already)", I checked the hibernate.cfg.xml file, I can see the
connection.pool_size property is configured with value 2 by default, I have
some doubts about this value, only 2 connections in the pool? that is not
enough at all, any good reason why the default value is 2? so what is the
recommended value?
Thanks
Dave
<property
name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
ERROR com.xpn.xwiki.store.DBCPConnectionProvider - Could not create a DBCP
pool. There is an error in the hibernate configuration file, please review
it.
org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (FATAL: sorry, too many clients already)
at
org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
~[commons-dbcp-1.3.jar:1.3]
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
~[commons-dbcp-1.3.jar:1.3]
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
~[commons-dbcp-1.3.jar:1.3]
at
com.xpn.xwiki.store.DBCPConnectionProvider.configure(DBCPConnectionProvider.java:196)
~[xwiki-platform-legacy-oldcore-3.5.jar:na]
at
org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:143)
[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:84)
[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:459)
[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:90)
[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2863)
[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2859)
[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1870)
[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
at
nextek.geo.fileupload.MediaViewServlet.doGet(MediaViewServlet.java:57)
[geoservice-3.3.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
[servlet-api.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
[servlet-api.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
[catalina.jar:7.0.26]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[catalina.jar:7.0.26]
at
com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
[xwiki-platform-webdav-server-3.5.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
[catalina.jar:7.0.26]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[catalina.jar:7.0.26]
at
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:217)
[xwiki-platform-container-servlet-3.5.jar:na]