I am using DHCP (and have been for years). This only started happening when I had my webhost upgrade to Tomcat 8 (and I converted to Cayenne 4). The connection mismanagement DOES NOT happen on my development server.
This is why I am starting with verifying the JDBC version via Cayenne. However, (as I said) DataSiourceInfo returns nulls. > On Aug 7, 2015, at 10:30 AM, John Huss <johnth...@gmail.com> wrote: > > I think this is a "feature" of MySQL. It closes idle connections > eventually. You can add a validationQuery to keep the connection active. > > On Fri, Aug 7, 2015 at 2:40 AM Joe Baldwin <jfbald...@earthlink.net> wrote: > >> Problem: I am having problems with MySQL connections being disabled >> improperly on the production server (the development server does not show >> the same error). This happens only after an idle period (and only on the >> production server). >> >> java.io.EOFException: Can not read response from server. Expected to read >> 4 bytes, read 0 bytes before connection was unexpectedly lost. >> com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3143) >> >> My theory is that there is some problem with the JDBC connector(s). So I >> am trying to track down two separate issues >> 1. my development MySQL DBMS version is 5.6 while the production >> version is 5.5 (this may be the problem) >> 2. my webhost gives me only incremental access to tomcat, so I am >> attempting to verify the JDBC connector (I installed per their directions - >> webhost imposed). >> >> It is #2 that is what I want to start with, but it is difficult to >> verify. I used to be able to accomplish #2 with Cayenne DataSourceInfo. >> However, >> >> getJdbcDriver() now returns null >> getUserName() now returns null >> and >> getMaxConnections() now returns the wrong number >> >> This used to work a few versions back - so this is confusing. So, I >> cannot tell at this point whether the DataSourceInfo is incorrect, or >> whether the dbcp.properties file (I am using DHCP) is not being read >> correctly, or some other problem. >> >> So, I believe my first step is to get DataSourceInfo working again so that >> I can verify the correct JDBC driver is being used (there are two - as I >> said). >> >> Question: >> 1. is DataSourceInfo still a reliable way to get JDBC info? >> 2. if so, could you please show me a few lines of example code (because my >> code is failing) ? >> >> Thanks >> Joe >> >> >> >>