You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by sasidhar prabhakar <sa...@gmail.com> on 2010/09/09 08:57:46 UTC

pool error timeout waiting for idle object

My application sometimes responding very slow.
When I observed the logs, it is showing these lines

Cannot get a connection, pool error Timeout waiting for idle object.

The maximum connections on oracle I set 150.
When I query for present sessions or process it is showing 70 to 80 and
decreasing to minimum of
52, sometimes it grows up to 100 above also and it decreasing back to
minimum.

In tomcat I configured max threads 300.

context.xml is

<Context path="" reloadable="true">
<Resource
accessToUnderlyingConnectionAllowed="true"
auth="Container"
driverClassName="oracle.jdbc.OracleDriver"
  maxActive="200"
  maxIdle="10"
  maxWait="8000"
validationQuery="SELECT * from dual"
testOnBorrow="true"
removeAbandoned="true"
removeAbandonedTimeout="30"
logAbandoned="true"
name="jdbc/ds"
  password=""
type="javax.sql.DataSource"
  url=""
  username=""/>
<Resource auth="Container" name="mail/Session" type="javax.mail.Session"
mail.smtp.host="localhost"/>

</Context>

For few days I am getting this problem.

Re: pool error timeout waiting for idle object

Posted by Mark Thomas <ma...@apache.org>.
On 09/09/2010 10:17, sasidhar prabhakar wrote:
> tomcat - 6
> oracle 11g
> centos 5
> jdbc type 4

That information isn't close to complete and is pretty much useless.
When asked for a version number, please provide the *full* version number.

You also missed out the JDBC driver version.

This is a community of users, not a commercial support portal. The level
of help you receive is directly proportional to the effort you are
prepared to put in to help yourself. Each member of this community has
their own tolerance levels for when they will just start ignoring
questions from people who don't appear to be prepared to put some effort
into solving their own problem. You are getting close to mine.


> the thread dump some of threads are
> 
> "http-80-262" daemon prio=1 tid=0x73048fd8 nid=0x268a waiting for monitor
> entry [0x6f975000..0x6f9760b0]
>     at
> org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
>     - waiting to lock <0x87287c00> (a
> org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory)
>     at
> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
>     at
> org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
>     at
> org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
>     at
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
>     at com.common.dao.LoginDAO.login(LoginDAO.java:87)
>      at com.common.bo.LoginBO.login(LoginBO.java:28)
>     at com.common.actionform.LoginForm.validate(LoginForm.java:54)
>     at
> org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:945)

That isn't the question I asked. What are the threads that already have
a connection doing. And whilst you are at it:
- how many threads appear to be using a connection?
- how many threads appear to be waiting for a connection?

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: pool error timeout waiting for idle object

Posted by sasidhar prabhakar <sa...@gmail.com>.
tomcat - 6
oracle 11g
centos 5
jdbc type 4


the thread dump some of threads are

"http-80-262" daemon prio=1 tid=0x73048fd8 nid=0x268a waiting for monitor
entry [0x6f975000..0x6f9760b0]
    at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
    - waiting to lock <0x87287c00> (a
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory)
    at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
    at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
    at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
    at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at com.common.dao.LoginDAO.login(LoginDAO.java:87)
     at com.common.bo.LoginBO.login(LoginBO.java:28)
    at com.common.actionform.LoginForm.validate(LoginForm.java:54)
    at
org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:945)


"http-80-259" daemon prio=1 tid=0x71903f60 nid=0x2687 waiting for monitor
entry [0x6fbfa000..0x6fbfb030]
    at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
    - waiting to lock <0x87287c00> (a
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory)
    at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
    at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
    at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
    at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at
com.cont.quiz.dao.QuizDAO.updateUserSelectionOfQOption(QuizDAO.java:320)
     at com.cont.quiz.bo.QuizBO.updateUserSelectionOfQOption(QuizBO.java:51)
    at
com.cont.quiz.action.AnsOfQuizQuestionAction.execute(AnsOfQuizQuestionAction.java:61)
    at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
    at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)


"http-80-257" daemon prio=1 tid=0x7aafeb68 nid=0x242b waiting for monitor
entry [0x6fc7b000..0x6fc7beb0]
    at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
    - waiting to lock <0x87287c00> (a
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory)
    at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
    at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:84)
    at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
    at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at com.stat.dao.StatisticsDAO.updateVisitor(StatisticsDAO.java:75)
     at com.stat.bo.StatisticsBO.updateVisitor(StatisticsBO.java:27)
    at org.apache.jsp.jsp.common_jsp._jspService(main_jsp.java:650)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


On Thu, Sep 9, 2010 at 2:31 PM, Mark Thomas <ma...@apache.org> wrote:

> On 09/09/2010 07:57, sasidhar prabhakar wrote:
> > My application sometimes responding very slow.
> > When I observed the logs, it is showing these lines
> >
> > Cannot get a connection, pool error Timeout waiting for idle object.
>
> > The maximum connections on oracle I set 150.
>
> <snip/>
>
> >   maxActive="200"
>
> That doesn't look right.
>
> There are lots of things that could be going on here and you have
> provided very little in the way of information. Questions it would be
> helpful to have the answers to include:
>
> - Tomcat version
> - Oracle version
> - Oracle JDBC driver type and version
> - Number of connections from Tomcat reported by Oracle when this happens
> - What does a thread dump show those connections are doing
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: pool error timeout waiting for idle object

Posted by Mark Thomas <ma...@apache.org>.
On 09/09/2010 07:57, sasidhar prabhakar wrote:
> My application sometimes responding very slow.
> When I observed the logs, it is showing these lines
> 
> Cannot get a connection, pool error Timeout waiting for idle object.

> The maximum connections on oracle I set 150.

<snip/>

>   maxActive="200"

That doesn't look right.

There are lots of things that could be going on here and you have
provided very little in the way of information. Questions it would be
helpful to have the answers to include:

- Tomcat version
- Oracle version
- Oracle JDBC driver type and version
- Number of connections from Tomcat reported by Oracle when this happens
- What does a thread dump show those connections are doing

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: pool error timeout waiting for idle object

Posted by sasidhar prabhakar <sa...@gmail.com>.
yes I can get through SQLDeveloper.



On Thu, Sep 9, 2010 at 12:32 PM, Wesley Acheson <we...@gmail.com>wrote:

> On Thu, Sep 9, 2010 at 8:57 AM, sasidhar prabhakar
> <sa...@gmail.com> wrote:
> > My application sometimes responding very slow.
> > When I observed the logs, it is showing these lines
> >
> > Cannot get a connection, pool error Timeout waiting for idle object.
> >
> > The maximum connections on oracle I set 150.
> > When I query for present sessions or process it is showing 70 to 80 and
> > decreasing to minimum of
> > 52, sometimes it grows up to 100 above also and it decreasing back to
> > minimum.
> >
> > In tomcat I configured max threads 300.
> >
> > context.xml is
> >
> > <Context path="" reloadable="true">
> > <Resource
> > accessToUnderlyingConnectionAllowed="true"
> > auth="Container"
> > driverClassName="oracle.jdbc.OracleDriver"
> >  maxActive="200"
> >  maxIdle="10"
> >  maxWait="8000"
> > validationQuery="SELECT * from dual"
> > testOnBorrow="true"
> > removeAbandoned="true"
> > removeAbandonedTimeout="30"
> > logAbandoned="true"
> > name="jdbc/ds"
> >  password=""
> > type="javax.sql.DataSource"
> >  url=""
> >  username=""/>
> > <Resource auth="Container" name="mail/Session" type="javax.mail.Session"
> > mail.smtp.host="localhost"/>
> >
> > </Context>
> >
> > For few days I am getting this problem.
> >
>
> More than likely a problem with your Oracle. When you can't get the
> sessions are you able to get them through another means such as toad
> or SQLDeveloper.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: pool error timeout waiting for idle object

Posted by Wesley Acheson <we...@gmail.com>.
On Thu, Sep 9, 2010 at 8:57 AM, sasidhar prabhakar
<sa...@gmail.com> wrote:
> My application sometimes responding very slow.
> When I observed the logs, it is showing these lines
>
> Cannot get a connection, pool error Timeout waiting for idle object.
>
> The maximum connections on oracle I set 150.
> When I query for present sessions or process it is showing 70 to 80 and
> decreasing to minimum of
> 52, sometimes it grows up to 100 above also and it decreasing back to
> minimum.
>
> In tomcat I configured max threads 300.
>
> context.xml is
>
> <Context path="" reloadable="true">
> <Resource
> accessToUnderlyingConnectionAllowed="true"
> auth="Container"
> driverClassName="oracle.jdbc.OracleDriver"
>  maxActive="200"
>  maxIdle="10"
>  maxWait="8000"
> validationQuery="SELECT * from dual"
> testOnBorrow="true"
> removeAbandoned="true"
> removeAbandonedTimeout="30"
> logAbandoned="true"
> name="jdbc/ds"
>  password=""
> type="javax.sql.DataSource"
>  url=""
>  username=""/>
> <Resource auth="Container" name="mail/Session" type="javax.mail.Session"
> mail.smtp.host="localhost"/>
>
> </Context>
>
> For few days I am getting this problem.
>

More than likely a problem with your Oracle. When you can't get the
sessions are you able to get them through another means such as toad
or SQLDeveloper.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org