On 1/10/17 12:48 PM, Christopher Schultz wrote:
> 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.

>From the stack trace, you can see dbcp2 in the package names.  I am
correct in assuming that tomcat does not kindly
s/removeAbandoned/removeAbandonedOnBorrow, right?

Phil
>
> -chris
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For
additional commands, e-mail: users-h...@tomcat.apache.org > >



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

Reply via email to