-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Jerry,
On 1/6/17 5:44 PM, Jerry Malcolm wrote: > On 1/6/2017 4:30 PM, Christopher Schultz wrote: >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 >> >> Jerry, >> >> On 1/6/17 10:35 AM, Jerry Malcolm wrote: >>> I'm getting "too many connections" errors. >> Where? >> >> Can you provide an exact error message and, better yet, a stack >> trace? >> >>> I'm pretty sure I am configured with enough connections that I >>> shouldn't run out. So I'm assuming I'm leaving some >>> connections open. >> That's a good assumption. >> >>> I have LogAbandoned="true" in my jdbc resource statements. >>> The doc says TC will log a stack trace of abandoned >>> connections. But I don't see any stack traces. Would they be >>> in stderr, stdout, catalina log? Or is it that I'm actually not >>> getting any abandoned? >> Which db connection pool are you using? Standard (DBCP-based) or >> tomcat-pool? A full (sanitized) <Resource> configuration would >> help. >> >> - -chris >> > Chris, Stack trace follows. It looks like it may be mySQL that's > rejecting the connection. But even if that's the case, it's > probably because I'm not closing some connections, which should > still generate a logAbandoned stack trace, correct? I believe I'm > using dbcp. Not doing anything fancy... Just defining data source > resources in the context file: > > <Resource testOnBorrow="true" validationQuery="SELECT 1" > name="jdbc/cis" auth="Container" type="javax.sql.DataSource" > maxTotal="100" maxIdle="30" maxWaitMillis="10000" > removeAbandoned="true" removeAbandonedTimeout="60" > logAbandoned="true" username="xxxxxxxx" password="xxxxxxx" > driverClassName="com.mysql.jdbc.Driver" > url="jdbc:mysql://localhost:3306/xxxxxxxxxx" /> Can you reproduce this in a testing environment? If not, I'd recommend the following: 1. Use maxActive="1" in dev/testing 2. removeAbandoned="false" in dev/testing These two settings will grind your application to a halt in dev/testing when you drop a connection because there's only one to go around. It will also help you find deadlock timebombs you may have when a thread tries to check-out two connections when only one is appropriate. You also might want to use a static-analysis tool like FindBugs to scan your code: it might find a bunch of places where you can immediately see missing Connection.close() calls. - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJYcCLYAAoJEBzwKT+lPKRYOP8QAIssYUCTjyV/ukTVtYFJHVyv upyqmFkoydAlHJzBluJw0U8NpT12+/mKN6JJJIJPtZZfvNc0kGq0Vd7Vl7mTOQx1 UZqH9ENrpzy+bPGjs2+21b1pstBas4TSyq3zM2nlx1QRgMwit31ywwJyYk3veYDf On20vAWGh3eT1xgnr+IXBCkn0KX6R4JgbRkX2Rh0Dpuah/7QmsNJI/tgBDyqDoOF UW2tN8oW6YfG0CLyodZWwg9jdM9cmLQgNmAc1TNqwoT+BqVDvHEVenLBTRL0OxWs XYSSmoFiivHdT1X6Wy7wR0Ido1/GrKxDD6WvdbRi8ZKqWOYUrjRehKuNE6NzeXH9 OVQBi6bmtTN853HEO6YBh54GQg3JblpyRxJ64fsmdnm/TvvylEUdfPVKnIjxlv5o AYpcfLsg0332xI/MmX+kRbfbQEpBv5fMR0M59p/FT0HYFMc6XtU+6AU6MNmYLwIP zFFPTWKYfswrfXG/PzM6ZU6DBX50UnR9pUmLUoC5n+h31AZMJ7cGxZSVOZ8pLlAt 9KL7h79uNLFUhgBvnHQwLswSm9lgAl6IJzPGOXRssmmWbNiB9+vSzkLjVOZg8Zze Rvj5LhsN4DylhBMXY9b+7tMqBHih9xZV/9ReDIpQ569bJX0t/mpXQemO01qVM9n7 vpqgCeLCy6QAjxNZsFgU =DIwn -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org