Re: Trying to chase down "too many connection" problems with DB

2018-03-28 Thread Phil Steitz
On 3/28/18 11:29 AM, Christopher Schultz wrote: > Phil, > > On 3/27/18 1:03 PM, Phil Steitz wrote: > > On 3/26/18 10:28 AM, Christopher Schultz wrote: > >> Shawn, > >> > >> On 3/25/18 12:17 AM, Shawn Heisey wrote: > >>> On 3/24/2018 5:04 PM, Mark Thomas wrote: > Regarding your configuration:

Re: Trying to chase down "too many connection" problems with DB

2018-03-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Shawn, On 3/27/18 8:41 PM, Shawn Heisey wrote: > So now I have one person telling me that removeAbandoned DOES > close connections, and another saying that it does NOT close > connections. Is there a conflict here, or are both of these >

Re: Trying to chase down "too many connection" problems with DB

2018-03-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Phil, On 3/27/18 1:03 PM, Phil Steitz wrote: > On 3/26/18 10:28 AM, Christopher Schultz wrote: >> Shawn, >> >> On 3/25/18 12:17 AM, Shawn Heisey wrote: >>> On 3/24/2018 5:04 PM, Mark Thomas wrote: Regarding your configuration: >>>

Re: Trying to chase down "too many connection" problems with DB

2018-03-28 Thread Phil Steitz
On 3/27/18 5:41 PM, Shawn Heisey wrote: > On 3/27/2018 11:03 AM, Phil Steitz wrote: >> Not exactly, if what you are using is the DBCP pool.  To see the > The factory in use right now is > "org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory".  Information > gathered previously in this thread told

Re: Trying to chase down "too many connection" problems with DB

2018-03-27 Thread Shawn Heisey
On 3/27/2018 11:03 AM, Phil Steitz wrote: > Not exactly, if what you are using is the DBCP pool.  To see the The factory in use right now is "org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory".  Information gathered previously in this thread told me that this is DBCP code, repackaged into the

Re: Trying to chase down "too many connection" problems with DB

2018-03-27 Thread Phil Steitz
On 3/26/18 10:28 AM, Christopher Schultz wrote: > Shawn, > > On 3/25/18 12:17 AM, Shawn Heisey wrote: > > On 3/24/2018 5:04 PM, Mark Thomas wrote: > >> Regarding your configuration: >> auth="Container" > >> factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" > >>

Re: Trying to chase down "too many connection" problems with DB

2018-03-27 Thread tomcat
On 26.03.2018 23:36, Shawn Heisey wrote: On 3/26/2018 2:39 PM, André Warnier (tomcat) wrote: Just a question, more to satisfy my curiosity : when you have these hundreds of "pending" connections, in what state are they, TCP/IP-wise ? Not sure where you got "pending". I don't recall

Re: Trying to chase down "too many connection" problems with DB

2018-03-26 Thread Shawn Heisey
On 3/26/2018 2:39 PM, André Warnier (tomcat) wrote: > Just a question, more to satisfy my curiosity : when you have these > hundreds of "pending" connections, in what state are they, TCP/IP-wise ? Not sure where you got "pending".  I don't recall mentioning anything like that. The TCP state is

Re: Trying to chase down "too many connection" problems with DB

2018-03-26 Thread tomcat
Hi. A question at the end. On 26.03.2018 22:01, Shawn Heisey wrote: On 3/26/2018 11:28 AM, Christopher Schultz wrote: The pool doesn't kill abandoned connections. It simply removes them from the pool. Otherwise, you're right: you'd have torches and pitchforks everywhere. That is a key piece

Re: Trying to chase down "too many connection" problems with DB

2018-03-26 Thread Shawn Heisey
On 3/26/2018 11:28 AM, Christopher Schultz wrote: > The pool doesn't kill abandoned connections. It simply removes them > from the pool. Otherwise, you're right: you'd have torches and > pitchforks everywhere. That is a key piece of information.  And it should have perhaps been obvious from the

Re: Trying to chase down "too many connection" problems with DB

2018-03-26 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Shawn, On 3/25/18 12:17 AM, Shawn Heisey wrote: > On 3/24/2018 5:04 PM, Mark Thomas wrote: >> Regarding your configuration: > auth="Container" >> factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" >>

Re: Trying to chase down "too many connection" problems with DB

2018-03-25 Thread Olaf Kock
Hi Shawn, only some aspects answered for now, inline: On 25.03.2018 19:31, Shawn Heisey wrote: On 3/25/2018 3:15 AM, Olaf Kock wrote: * Liferay comes (optionally) bundled with Tomcat to ease installation, however, the tomcat in there will be your own and is up to you to upgrade. Yes, new

Re: Trying to chase down "too many connection" problems with DB

2018-03-25 Thread Shawn Heisey
On 3/25/2018 3:15 AM, Olaf Kock wrote: * Liferay comes (optionally) bundled with Tomcat to ease installation, however, the tomcat in there will be your own and is up to you to upgrade. Yes, new versions of Liferay will come with new versions of Tomcat, but new versions of Liferay won't be

Re: Trying to chase down "too many connection" problems with DB

2018-03-25 Thread Olaf Kock
On 24.03.2018 05:08, Shawn Heisey wrote: This message is long.  Lots of details, a fair amount of history. The primary Tomcat version we've got is 7.0.42. Specifically, it is the Tomcat that's included with Liferay 6.2. This is why we haven't attempted an upgrade even though the version

Re: Trying to chase down "too many connection" problems with DB

2018-03-24 Thread Shawn Heisey
On 3/24/2018 5:04 PM, Mark Thomas wrote: Regarding your configuration: Generally, that looks OK but I'd strongly recommend that you use "autoReconnect=false" in the URL. autoReconnect is known to be problematic with connection pools. The removeAbandonedTimeout looks low but if all the queries

Re: Trying to chase down "too many connection" problems with DB

2018-03-24 Thread Shawn Heisey
On 3/24/2018 5:04 PM, Mark Thomas wrote: There are two pools available. org.apache.tomcat.jdbc.pool.DataSourceFactory is a different pool developed in the Tomcat project (generally called JDBC pool). OK, so that means that the currently active config is using dbcp.  The *new* config that

Re: Trying to chase down "too many connection" problems with DB

2018-03-24 Thread Mark Thomas
On 24/03/18 22:28, Shawn Heisey wrote: > The factory we have now is > "org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory".  The factory in > the documentation, and what I put in the configuration I'm building, is > "org.apache.tomcat.jdbc.pool.DataSourceFactory". These are both in the > tomcat

Re: Trying to chase down "too many connection" problems with DB

2018-03-24 Thread Shawn Heisey
On 3/24/2018 3:34 PM, Christopher Schultz wrote: Before we go too far, you have said: 1. You have 5 prod servers 2. They have several pools defined 3. The above is an example of a defined pool Just above, that configuration says maxActive=60. 5 * 60 = 300 connections. And that's just for one

Re: Trying to chase down "too many connection" problems with DB

2018-03-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Shawn, On 3/24/18 12:08 AM, Shawn Heisey wrote: > This message is long. Lots of details, a fair amount of history. Thanks for the back-story and the configurations. It really helps explain what is going on. > Here's a redacted configuration that

Re: Trying to chase down "too many connection" problems with DB

2018-03-24 Thread Shawn Heisey
On 3/24/2018 5:36 AM, Filippo Machi wrote: Hello Shawn, about this question, are you sure that none of the webapps running on those tomcats are connecting to the database without using the pools configured in the context.xml? Creating other pools or performing direct connections? That could

Re: Trying to chase down "too many connection" problems with DB

2018-03-24 Thread Filippo Machi
*1) I think this is the really burning question in my mind: Why is the server opening NEW connections when there are dozens of them already open? Does this mean that (as I suspect) all those connections are abandoned? If so, why are they not getting cleaned up, when we have removeAbandoned set to