Hi Darrell,

this is just a shot in the dark but it may be that after some time that the 
connections in the pool are not used, they are terminated by the db server and 
are no longer valid.
It may be a configuration issue as this should not happen... it may be useful 
if you could share the thread dump.

Jacopo

On Nov 26, 2014, at 9:36 PM, darrell73s <[email protected]> wrote:

> Hi All,
> 
> I've been having some strange behavior on a test system (with little to no
> volume) AND a live system for a custom OFBiz 12.04.02 application which I've
> created. It's worth noting that in the custom application, raw connections
> are not used, and everything is always done within the confines of the
> entity engine and framework.
> 
> I'll briefly explain the architecture which applies to the TEST and LIVE
> systems, but more details can be provided as needed. I have a PostgreSQL
> database which is shared between two different instances of OFBiz. One
> instance (1) has certain webapps running, and another instance (2) has a
> different set of webapps running. We run Apache 2.4 in front of each
> instance, and Apache is connected to the OFBiz tomcat via AJP using mod_jk.
> I've also ensured that only one instance's job manager is actually
> processing jobs, to keep the table locking to a minimum.
> 
> The strange part is that frequently, you will attempt to connect to OFBiz
> instance 1, and Tomcat is unresponsive. I've determined there to be an issue
> connecting to Tomcat as mod_jk reports errors about not being able to
> connect to the ajp port, and since I also run the http connector, if I
> attempt to connect locally on the machine (i.e.
> http://localhost:8080/webtools - completely bypassing Apache 2.4) the
> browser hangs and I never receive a response. The other OFBiz instance
> appears to be unaffected in this manner. I only mention this other instance
> in case there's some multi-instance interaction occurring which I may not be
> aware of. 
> 
> Generally, the only way to fix this is to restart the application, and it's
> fine for a while, but ultimately I'll see the same behavior before too long.
> I've run jVisualVM, performed a thread dump, and noticed there to be locks
> on the GenericObjectPool.doBorrow() method which is in the same call stack
> as retrieving database connections from the pool. Figuring that it could
> perhaps be a database pooling issue, I ran using the DebugManagedDataSource
> in the DBCPConnectionFactory, but the information it provided didn't appear
> to indicate any issues.
> 
> Interestingly enough, the LIVE system (which users are constantly using),
> lasts longer without needing restarts than the TEST system which has little
> to no volume.
> 
> Have any of you seen anything like this? Given that I'm seeing an issue even
> with Apache out of the picture it almost seems as though there may be a
> misconfiguration in OFBiz?
> 
> Thanks!
> Darrell
> 
> 
> 
> --
> View this message in context: 
> http://ofbiz.135035.n4.nabble.com/Tomcat-Unresponsive-tp4659005.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to