tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saurabh Saraswat <ssaras...@pivotalindia.com>
Subject Re: SQLNestedException in Connection Pooling With Tomcat 7.0.39
Date Tue, 08 Apr 2014 09:46:12 GMT
On Fri, Apr 4, 2014 at 8:39 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Daniel,
>
> On 4/4/14, 8:57 AM, Daniel Mikusa wrote:
> > On Apr 4, 2014, at 8:22 AM, Saurabh Saraswat
> > <ssaraswat@pivotalindia.com> wrote:
> >
> >> Dear Dan,
> >>
> >> Thanks for your response!
> >>
> >> I have cross checked the user / password configuration. All is
> >> correct.
> >
> > If you're getting "Access Denied" exceptions, there is only one
> > cause and that's bad credentials (or host + credentials, because
> > MySQL can limit access based on the host).  If you're not seeing
> > these any more then, disregard.
>
> I've never tried this, but it could also be due to connection-limits
> on the server itself. Having "root" limited to a certain number of
> connections sounds like a terrible idea, but then again, so does
> connecting as root in the first place.
>
> >> As i mentioned that initially i am getting the object of
> >> connection but after some time (After few hits to database from
> >> application) my web app goes to slow and than it stops working i
> >> i got the below exception-
> >> *org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a
> >> connection, pool error Timeout waiting for idle object*
> >
> > +1 to David's suggestion.  You could be leaking connections or your
> > queries are very slow.
>
> +1
>
> > Two suggestions:
> >
> > 1.) Enable the slow query log on your MySQL server and see if the
> > queries are slow.  Alternatively, login to your MySQL server and
> > run 'show processlist".  That will show you what queries are
> > running.
>
> +1
>
> > 2.) Enable DBCP's abandoned connection detection.  See the
> > "removeAbandoned" attribute.
>
> +10
>
> > With this (and logAbandoned), the pool will alert you when your
> > application does not properly return connections to the pool.
>
> In development, I always recommend that you use maxActive="1" for your
> connection pools. This will expose any potential deadlocks you may
> have mistakenly coded into your application.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJTPssiAAoJEBzwKT+lPKRYTx4QAK8a4WJIx1i+yWyZquSrCnad
> RBNB69jnPmYG0Uzc/yKyHzOXvv2wt1vE22wYyp64b4FFVqQNBmEnnm6XI20PSR2i
> Yt9lm5wZ5/5fsCGvj39B8E11GCao5enzkhXUpa51spLnjHfw5k3o0gGmWAqhLVza
> nOfbG+rTjjjXCrr1Y6tz0g+35M+w02TIh87Z5xdkvboqv/NRfxbGKRIZB2e1zT0K
> USY4skgug3L1TpKiXgoRNv7g7gbxHB7AXgL1po+PI1T1mNXCakUE81O26Etv/wm2
> 1A/d15LfCLou0uWQSfHPqaoODGFVOTsRWwn8xiJdjo2Ah/y7OqXfzMQh41UBO8H7
> jNmakIHlb6NYDJK6LiRFlGw5K9AEO+dNFJ9e6Gi4kELB4Kn6CGqFRD3aqTsVerOb
> EhEG844nDmVRzr7gwK58aXSICy8PURDOfmZ+IaXehz0MARnKQiog3cWBT+EKIHxq
> RUAc0T/YEG+Qm1jiZef5h+NuMZLrzczQIOXXGYkjcMwGcUxmjzBbbvYbr56g84jL
> 3ukIXp6bnOvyIdB8jnibbICoR/sj0Mg4zia7vTPkqdXbU3Ng2W6/lV9K2Mnm9aDL
> OcLocnWnFGZycukIDYtfbtZOY7wTAqk5fJsZauDQGeeA4M9UXu4dPgpaoahuK8Dq
> moJwtEq/5/JNXkctdS7n
> =RI4v
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
All,

I have tested with configurations suggested by all of you.I am not getting
exceptions now but still after certain time, the server gets hanged.

Any suggestion please,still not able to rid out of this issue.

Saurabh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message