0

Hello i am having a issue where i create connections to the as400 system using tomcat.

Everytime we call the as400 system it creates a connection. Sometimes the system lags and we never get a response back and it just holds up so we never close that connection so the file stays open.

I have ulimit set to 65535

Is there a way that after 10 or so minutes if a connection like this

java      29838  tomcat  504u     IPv6     631178                  TCP server.net.local:53494->as400:8000 (ESTABLISHED)
java      29838  tomcat  505u     IPv6     631137                  TCP server.net.local:53480->as400:8000 (ESTABLISHED)
java      29838  tomcat  506u     IPv6     631141                  TCP server.net.local:53483->as400:8000 (ESTABLISHED)
java      29838  tomcat  507u     IPv6     631281                  TCP server.net.local:53503->as400:8000 (ESTABLISHED)
java      29838  tomcat  508u     IPv6     631179                  TCP server.net.local:53495->as400:8000 (ESTABLISHED)
java      29838  tomcat  509u     IPv6     630925                  TCP server.net.local:53446->as400:8000 (ESTABLISHED)

so if a connection has a TCP connection, or if it is called as400:8000? I can have something that will kill it after 10 minutes or so?

Or is this impossible to do.

Thank you for your time any help is appreciated.

user1863457
  • 131
  • 2
  • 11
  • If I understand your problem correctly. You would like to kill the connections which are 10 minuntes older correct? – Manisha Mahawar Oct 09 '13 at 16:40
  • if it is under tomcat and it is a established connection. I don't want to just kill everything under tomcat since that would basically mean i am killing tomcat and all the jar. I only want to kill connections that are established through TCP or IPv6 – user1863457 Oct 09 '13 at 16:51
  • What kind of "connections" are you making? Do you have appropriate timeouts set on those "connections"? – Christopher Schultz Oct 09 '13 at 17:35
  • I have timeouts set for mysql databases but not for the SAP system that i am connecting too. – user1863457 Oct 09 '13 at 18:23
  • How are you connecting to that system? Plase show your code. – David Levesque Oct 09 '13 at 19:41
  • http://blogs.technet.com/b/janelewis/archive/2010/03/09/explaining-close-wait.aspx this is awesome article which might help you. You can just edit the tcp time wait setting for it to expire in case of wait. – Manisha Mahawar Oct 10 '13 at 03:30

0 Answers0