Foros de discusión

c3po pooling usage in LR 6.0.6

Peter Helgren, modificado hace 6 años.

c3po pooling usage in LR 6.0.6

Regular Member Mensajes: 124 Fecha de incorporación: 14/11/13 Mensajes recientes
OK. This is a trip on the wayback machine but I need a bit of help on a 6.0.6 installation on Glassfish 3.0.1 on Linux (RHEL5) that is going to be replaced soon but is pretty much at the end of the rope when it comes to performance. Here is what I to need to know:

1) Is there any connection pooling by default ? I think the answer is that yes, the default is C3PO but if so, that leads to my next question:

2) If C3PO IS the default. what are the default pooling parameters if they haven't been entered in a portal-ext.properties file?

Here is the overall issue: We have about 1200 concurrent sessions on any given day. It is particularly busy now because we are keeping the CPU very busy with some video transcoding. The side effect of the high CPU utilization is that we see active thread counts grow from a normal of around 200 until they hit a maximum (around 800) and the server is pretty much unresponsive. Taking a look at the active threads they *seem* to be waiting on connections to MySQL. At sign in, we do some role validation, check to see that they have roles that match an external DB. So we would be doing a bunch of reads and a few writes to the roles tables in Liferay (through the API).

I'd like to "tune" the settings if possible but #1) I don't know if pooling is enabled and #2) If C3PO IS enabled then what values are the default for the pool?

Again, there are no references to pools in any portal*.properties files so whatever is enabled is out of the box defaults.
thumbnail
David H Nebinger, modificado hace 6 años.

RE: c3po pooling usage in LR 6.0.6

Liferay Legend Mensajes: 14918 Fecha de incorporación: 2/09/06 Mensajes recientes
Peter Helgren:
1) Is there any connection pooling by default ? I think the answer is that yes, the default is C3PO but if so, that leads to my next question:

2) If C3PO IS the default. what are the default pooling parameters if they haven't been entered in a portal-ext.properties file?


There are two sources for config, the first are the set of defaults that C3PO will use, but the second are those defined in the portal.properties file.

Remember that portal-ext.properties just contains the overrides from those values defined in portal.properties.

Here is the overall issue: We have about 1200 concurrent sessions on any given day. It is particularly busy now because we are keeping the CPU very busy with some video transcoding. The side effect of the high CPU utilization is that we see active thread counts grow from a normal of around 200 until they hit a maximum (around 800) and the server is pretty much unresponsive. Taking a look at the active threads they *seem* to be waiting on connections to MySQL. At sign in, we do some role validation, check to see that they have roles that match an external DB. So we would be doing a bunch of reads and a few writes to the roles tables in Liferay (through the API).

I'd like to "tune" the settings if possible but #1) I don't know if pooling is enabled and #2) If C3PO IS enabled then what values are the default for the pool?

Again, there are no references to pools in any portal*.properties files so whatever is enabled is out of the box defaults.


Hey, Pete, I did a blog post about running Hikari CP under Tomcat. It wasn't really Liferay-specific. For me, the keys are in the performance test chart data for Hikari vs the others, including C3P0.

The great part about all of this is that it is very easy to switch up, even if you were using the portal-ext.properties to establish your DB connections. Simply move them to ROOT.xml using Hikari, then get rid of the property values.








Come meet me at 2017 LSNA!
Peter Helgren, modificado hace 6 años.

RE: c3po pooling usage in LR 6.0.6

Regular Member Mensajes: 124 Fecha de incorporación: 14/11/13 Mensajes recientes
Thanks Dave. This looks promising. I am using Glassfish instead of Tomcat but a quick scan indicates that Java 6 is till supported and that seems the only requirement that would impact my ancient 6.0.6 version. I'll try this on our test server and see how it goes.

AND one more thing....

(disclaimer: I inherited this configuration): As far as I can tell, there isn't a portal.properties file. Nothing in /applications/liferay-portal/WEB-INF/classes nothing in the /liferay/liferay-portal-6.0.6/ folder. What I do have is a portal-developer.properties in /applications/liferay-portal/WEB-INF/classes and a portal-ext.properties file in /liferay/liferay-portal-6.0.6/ Again, there isn't a portal.properties file with c3po setting and there isn't any .properties file with a c3po settings which is why I am so curious about how LR 6.0.6 sets connection pooling for the base LR database in MySQL.