in reply to Detecting and reaping stale sockets
A better thing to do would be to fix the actual issue at hand then trying to bandage a solution. If your firewall is timingout connection then it sounds like it is maintaing a state table and possibly translating (NAT) the connection. You do not need to do this. Why? Because there is no benefit to keeping a state on a persistent database connection and no added security since as far as I've ever seen no one has made a list of secure database commands to check against in the application layer. This would be very hard to do since most database problems come in valid syntax queries.
So what you really need to do is ask your firewall/network person to treat your connection as a static route and only apply packet filtering rules, no state. This is achievable but can be difficult on some firewalls, cisco pix for example. that treat every connection through them as a route. This will prevent the firewall from closing the socket and preventing the webserver from sending the fin in the first place.
If this does not work for you let me know, there are some other solutions you could try that I've helped clients with.
Just my opinion.
Dave -- Saving the world one node at a time
|
|---|