users@glassfish.java.net

Re: Maximum Connections Reached: 4096 -- Retry later

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 03 Mar 2009 13:27:35 -0500

Salut,

all threads are dead locked to a JDBC connection ;-)

> "httpSSLWorkerThread-50011-4" daemon prio=3 tid=0x02be8000 nid=0x2ba runnable [0x4f879000..0x4f87fbf0]\par
> java.lang.Thread.State: RUNNABLE\par
> \tab at java.net.SocketInputStream.socketRead0(Native Method)\par
> \tab at java.net.SocketInputStream.read(SocketInputStream.java:129)\par
> \tab at oracle.net.ns.Packet.receive(Unknown Source)\par
> \tab at oracle.net.ns.DataPacket.receive(Unknown Source)\par
> \tab at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)\par
> \tab at oracle.net.ns.NetInputStream.read(Unknown Source)\par
> \tab at oracle.net.ns.NetInputStream.read(Unknown Source)\par
> \tab at oracle.net.ns.NetInputStream.read(Unknown Source)\par
> \tab at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1104)\par
> \tab at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1075)\par
> \tab at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:480)\par
> \tab at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)\par
> \tab at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810)\par
> \tab at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)\par
> \tab at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)\par
> \tab at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)\par
> \tab at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)\par
> \tab at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)\par
> \tab - locked <0x9b2e5d20> (a oracle.jdbc.driver.T4CPreparedStatement)\par
> \tab - locked <0x9b2c2720> (a oracle.jdbc.driver.T4CConnection)\par
> \tab at com.sun.gjc.spi.ManagedConnectionFactory.isValidByTableQuery(ManagedConnectionFactory.java:383)\par
> \tab at com.sun.gjc.spi.ManagedConnectionFactory.isValid(ManagedConnectionFactory.java:297)\par
> \tab at com.sun.gjc.spi.ManagedConnectionFactory.getInvalidConnections(ManagedConnectionFactory.java:246)\par
> \tab at com.sun.enterprise.resource.AbstractConnectorAllocator.getInvalidConnections(AbstractConnectorAllocator.java:99)\par
> \tab at com.sun.enterprise.resource.AbstractConnectorAllocator.isConnectionValid(AbstractConnectorAllocator.java:111)\par
> \tab at com.sun.enterprise.resource.AbstractResourcePool.isConnectionValid(AbstractResourcePool.java:701)\par
> \tab at com.sun.enterprise.resource.AbstractResourcePool.getUnenlistedResource(AbstractResourcePool.java:653)\par
> \tab at com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:594)\par
> \tab at com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:443)\par
> \tab at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)\par
> \tab at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)\par
> \tab at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:327)\par
> \tab at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235)\par
> \tab at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)\par
> \tab at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)\par
> \tab at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:108)\par
> \tab at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)\par
> \tab at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)\par
> \tab at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)\par
> \tab at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:40)\par
> \tab at $Proxy842.setTransactionIsolation(Unknown Source)\par
> \tab at com.anm.hibernate.HibernateConnection.setIsolationLevel(HibernateConnection.java:74)\par
> \tab at com.anm.hibernate.HibernateConnection.getSession(HibernateConnection.java:49)\par
> \tab at com.anm.hibernate.SuperDAO.getSession(SuperDAO.java:308)\par
> \tab at com.anm.ontra.dao.OueExtserviceDAO.getValidService(OueExtserviceDAO.java:87)\par
> \tab at com.anm.ontra.oue.extservice.api.ExtServiceExecutor.getExternalService(ExtServiceExecutor.java:209)\par
> \tab at com.anm.ontra.oue.extservice.api.ExtServiceExecutor.execute(ExtServiceExecutor.java:38)\par
> \tab at com.anm.ontrabi.utils.BIUtils.executeOmService(BIUtils.java:41)\par
> \tab at com.anm.ontrabi.SingleSignOnServletBI.getUserDetails(SingleSignOnServletBI.java:313)\par
> \tab at com.anm.ontrabi.SingleSignOnServletBI.doGet(SingleSignOnServletBI.java:184)\par
> \tab at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)\par
> \tab at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)\par
> \tab at sun.reflect.GeneratedMethodAccessor614.invoke(Unknown Source)\par
> \tab at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\par
> \tab at java.lang.reflect.Method.invoke(Method.java:597)\par
> \tab at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:276)\par
> \tab at java.security.AccessController.doPrivileged(Native Method)\par
> \tab at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)\par
> \tab at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:309)\par
> \tab at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:192)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:404)\par
> \tab at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:855)\par
> \tab at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)\par
> \tab at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)\par
> \tab at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474)\par
> \tab at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:107)\par
> \tab at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:122)\par
> \tab at java.security.AccessController.doPrivileged(Native Method)\par
> \tab at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:352)\par
> \tab at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:405)\par
> \tab at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:220)\par
> \tab at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:164)\par
> \tab at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)\par
> \tab at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)\par
> \tab at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)\par
> \tab at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)\par
> \tab at sun.reflect.GeneratedMethodAccessor615.invoke(Unknown Source)\par
> \tab at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\par
> \tab at java.lang.reflect.Method.invoke(Method.java:597)\par
> \tab at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:276)\par
> \tab at java.security.AccessController.doPrivileged(Native Method)\par
> \tab at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)\par
> \tab at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:309)\par
> \tab at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:192)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:404)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:75)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:181)\par
> \tab at java.security.AccessController.doPrivileged(Native Method)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:177)\par
> \tab at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)\par
> \tab at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:75)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:181)\par
> \tab at java.security.AccessController.doPrivileged(Native Method)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:177)\par
> \tab at org.apache.myfaces.component.html.util.MultipartFilter.doFilter(MultipartFilter.java:105)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:75)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:181)\par
> \tab at java.security.AccessController.doPrivileged(Native Method)\par
> \tab at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:177)\par
> \tab at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)\par
> \tab at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)\par
> \tab at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)\par
> \tab at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)\par
> \tab at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)\par
> \tab at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)\par
> \tab at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)\par
> \tab at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)\par
> \tab at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)\par
> \tab at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)\par
> \tab at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)\par
> \tab at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)\par
> \tab at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)\par
> \tab at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)\par
> \tab at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)\par
> \tab at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)\par
> \tab at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)\par
> \tab at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)\par
> \tab at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)\par
> \tab at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)\par
> \tab at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)\par
> \tab at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)\par
> \tab at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)\par
> \tab at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)\par
> \tab at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)\par
> \tab at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)\par

You might want to increase the number of WorkerThread,

<request-processing ...thread-count="XX".../>

in domain.xml, but I would first recommend you understand why it is
locked on the database.

A+

-- jeanfrancois



glassfish_at_javadesktop.org wrote:
> Interesting. I'm reading through what the search returned now.
>
> The attachment should be just below the subject and just above the text of my last post.
> [Message sent by forum member 'davideagen' (davideagen)]
>
> http://forums.java.net/jive/thread.jspa?messageID=334829
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>