socket_timeout tells Apache to CLOSE connections that have been unused
for that time, but only WHEN it needs it.

So that will cause problems on the Tomcat side.



Why will it cause problems on the Tomcat side?



See below.

IMO, it has a good chance of fixing the problem as Apache/mod_jk will open
a new connection if it hasn't been used for a while which should prevent
the SYN problem the original poster was having problems with.


It's worth trying. Agreed.

Tomcat will
detect the closed connection and return that JK thread back to the pool
for later use.



It won't. If the firewall has already dropped the connection, Tomcat will not notice it being closed.

And as I said (and sources seem to agree with me ;-), socket_timeout is only checked synchronously, i.e. at usage time. So, maybe socket_timeout=10, but you may have connections staying up for ... as long as a whole night of deep inactivity.

In the morning, if you "netstat" on both machines, you will see a different number of ESTABLISHED connections. You will have more of them in the Tomcat side. And that is not good. Add up some nights, and you will have to restart your tomcat server in a couple of days / a week / a couple of weeks, depending on your MaxSpareClients (or equivalent) in your web server and your maxProcessors / maxThreads in Tomcat.

That is because Tomcat does not use keepalive on its side, and never sends any data to the client if the data has not been requested (AFAIK).

Some time ago, I proposed to fix this. I am not sure what the conclusion was.

Even if it doesn't help, it's an easy change to try.



Agreed.

-Dave



Antonio Fiol

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Reply via email to