Bug 844470

Summary: Java applications lose mysql db connectivity after several hours
Product: OKD Reporter: Nam Duong <nduong>
Component: ContainersAssignee: Dan Mace <dmace>
Status: CLOSED DUPLICATE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 2.xCC: dueyese, jofernan
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-31 14:23:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nam Duong 2012-07-30 19:06:47 UTC
Description of problem:

There are a couple of threads where users are having mysql db connectivity hours after several hours.  See:
https://openshift.redhat.com/community/forums/openshift/intermittent-mysql-connectivity-issues
and
https://openshift.redhat.com/community/forums/openshift/java-jndi-openshift-mysql-cartridge

This is different from https://bugzilla.redhat.com/show_bug.cgi?id=841389 where scaled apps have db connectivity issues after a minute or so.

Comment 1 Dan Mace 2012-07-30 19:40:30 UTC
Nam,

I still suspect this is the same issue as https://bugzilla.redhat.com/show_bug.cgi?id=841389. The current default MySQL datasource pool configuration we provide in standalone.xml does not configure a connection pool checkout test, and so even without scaling, the application will still attempt to use stale connections. The only difference is that when using an unscaled app, the connection TTLs are much longer by default, which explains why the apps are having trouble after hours rather than minutes in the scaling scenario (in which the TTL becomes 60 seconds due to the proxy sitting between the application and MySQL).

Users can work around this by configuring their app's standalone.xml to add the pool checkout configuration described in bug 841389.

This isn't a bug in OpenShift per say, but rather a poor default configuration we've provided. Ultimately users are responsible for configuring their connection managers to account for stale connections. Going forward we will provide better defaults.

I'll also respond with this information on the forum threads. Please revisit the issues in the context of this comment and let's talk about closing it as a duplicate of bug 841389.

Comment 2 Dan Mace 2012-07-30 19:51:38 UTC
Nam,

I forgot to add: If users are experiencing MySQL connection loss even with the new configuration from 841389, please also consider another recently resolved bug:

https://bugzilla.redhat.com/show_bug.cgi?id=842977

Comment 3 Dan Mace 2012-07-31 14:23:05 UTC

*** This bug has been marked as a duplicate of bug 841389 ***