I've an apache proxy between browser and my custom web server. So after beginning the webserver, I'm able to access my web application for like 4-5 hrs. Next I recieve this error
Proxy Error The proxy server received an invalid response from an upstream server. The proxy server couldn't handle the request GET /.
Reason: Error reading through from remote server
To gain access to the net application again, I must restart the net server. I attempted to determine the log I acquired from the web server and just error for the reason that log , I'm finding is
com.mysql.jdbc.CommunicationsException: Communications link failure because of underlying exception:
** BEGIN NESTED EXCEPTION **
java.internet.SocketException MESSAGE: Connection timed out
java.internet.SocketException: Connection timed out at java.internet.SocketInputStream.socketRead0(Native Method) at java.internet.SocketInputStream.read(SocketInputStream.java:146) at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113) at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160) at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188) at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1910) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2304) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2803) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665) at com.mysql.jdbc.Connection.execSQL(Connection.java:3170) at com.mysql.jdbc.Connection.execSQL(Connection.java:3099) at com.mysql.jdbc.Statement.execute(Statement.java:695) at hra.database.Pool.getConnection(Pool.java:62)
** Finish NESTED EXCEPTION **
Last packet delivered to the server was 925624 ms ago.
And That I attempted to repair this database error, however i get the above mentioned pointed out proxy error, so certainly the log details are not helpful.
This is exactly what I get from Apache Proxy log
(70007)The timeout specified has expired: proxy: error reading through status line from remote server
Does anybody understand what could possibly be the problem or any useful pointers to repair this problem?
What's likely happening is your up-stream server is shutting itself lower due to lack of exercise. Discover the setting around the server that controls might transform it up.
I can tell that you simply see two connection timeout errors
- Apache Proxy Web server timing out while hooking up to custom web server
- Custom web server timing out while hooking up to database
When the timeout set on proxy server is less than timeout looking for database connection, prior to the database connection occasions out, proxy server would break too.
- Like a first factor resolve all DB connectivity issues and test out your application by directly hooking up to custom web server (not via proxy).
- Observe and identify normal response some time and max response time.
- Set proxy break [cde] to become a value that's a lot more than (max response time) + (network delay)
If at all possible you might share proxy server designs that will help you further.
- apache proxy fails because customwebserver doesn't answer. your
- customwebserver logs an accident awaiting mysql to reply to. restarting
customwebserver fixes it, so mysql isn't the problem. it appears such as the problem the way in which your customwebserver handles its connections to mysql.
are we able to call at your jdbc config? have you got autoReconnect=true ?
I believe like mentioned through the previous answer that you simply encounter a timeout elevated by among the people of the infrastructure:
- network device (hubs are clever monsters but fire walls could be clever too)
Have you setup a genuine connection pool ? Using heartbeat mechanism to help keep alive connections ? This induces some network traffic but eliminates such problems ? Use a network capture tool to possess many logs to evaluate