archiver-appliance / epicsarchiverap

This is an implementation of an archiver for EPICS control systems that aims to archive millions of PVs.
Other
40 stars 39 forks source link

Proxying remote servers when KeepAlive is turned on does not close the connection. #21

Closed slacmshankar closed 8 years ago

slacmshankar commented 8 years ago

When proxying remote appliances (and even ChannelArchivers), if KeepAlive is enabled on the server, then the JDK URLConnection does not close the connection. This keeps the socket in CLOSE_WAIT state till GC kicks in.

We really have no need to keep the connection open and should try as hard as possible to relinquish the socket.

slacmshankar commented 8 years ago

Checked on fixes. Use Apache commons when possible and add a Connection:close to close the connection. Tested by proxying retrieval from the photon archiver.