-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Phil,
On 1/8/17 5:41 PM, Phil Steitz wrote: > On 1/6/17 3: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" /> > In dbcp 2, the "removeAbandoned" config option was replaced by > removedAbondonedOnBorrow and removeAbandonedOnMaintenance. You > need to set one of these to true the get abandoned connection > cleanup to work. See [1]. > > |Phil > > [1] > http://commons.apache.org/proper/commons-dbcp/configuration.html +1 Jerry never said what version of Tomcat he was using... I was assuming a DBCP 1.x-based version given his configuration. - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJYdTqkAAoJEBzwKT+lPKRYE3IP/27WYTjNJMy9zKO6/0EGKH7C SNhRRlz+uFWZsgVLlHHX1DVMnjBKRcfQBVqRPWflUe4LYWxVFxBAHuZ+luOBtZJp 4WgFBaroj/D8PQUKPkoetAN8iQU/BZ8Axn64bOp4WmaREyoS+vCkUiyRP6+a5Uve wEjYATrNBGe4ISQQ5rpqHHR4XHNvY0xSXWtopkgowp2Y3ykyae+6SPlufK4CYf7n m09YJszTc1sqCPQ1kCrbi0CVtF2RPOPqE2PGEA03t2Xk4aeAJROv17/FgvYVNS1G D3wzKmhCt3qlx1D/IsdM2giujHGA3nhojKzF1XaLUPjt8UauZBIN51JO2wDKOhJH FJJ6p+5pb4IRqOweEtYoDsoDzXUJr5nSd0AIxT43IFgXbNTH7t41j5hNdZ3dr1WE /hPrMa8sEGu5Yv6jfuf4Xlw9h/R9WCnSiACxlHFvGKBf1edsOHoJnR7gkYTZpC3H cdRW7q9zSU1qre96ODHmT9rXWq25hyKs0p7ig5cOKyG0f7zFrJRLgwvuW4oMgPvU 2piKjBrNIzEo/dOyjjkVMoqGr5Bj7LOr8q6vCEJO+lQ+RbQU76zLJ5Yg0vlUsO+A qlyAi2mDcBJpQEvt6OjNt1zhlQ7Wet7okp25ki+0jozJu33jBfn2NP0Uiqk4HYsL LqwPhvP8UM9rSkobr8ox =rO7t -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org