web application connection time out

D_wathi
D_wathi used Ask the Experts™
on
Dear Experts

We are running web server (10.253.18.41) which is on lamp stack and database server mysql is on another server 10.253.12.42, users are complaining the application is taking too long time also on prospect conversion takes too much time and finally timeout approx 3 mins then time out , when check the network statics below is the continuous report, please let me know what does this indicate, what could be the solution

tcp        0      0 10.253.18.41:38760          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38765          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38274          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38130          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38590          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38116          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:39296          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38577          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38379          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:39027          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38827          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38222          10.253.12.42:3306           TIME_WAIT
tcp        0      0 10.253.18.41:38225          10.253.12.42:3306           TIME_WAIT
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Developer / Linux System Administrator / Managing Director
Commented:
TIME_WAIT indicates that one side (the local side, I believe) has closed the TCP connection. Because of the way that the TCP protocol works, it cannot immediately close a connection but must wait in case other packets arrive. You can read more about this by looking up how the TCP protocol works.

With regard to the delay that you are seeing, it is more likely to be server side and application related. You have asked a few questions related to this before and I think that the delays you are experiencing are not specifically due to the network connection. You should verify your network connectivity as a separate process and not try to combine the diagnostics with the application you are experiencing problems with. Simplify your tests as much as possible and you will narrow down the problem to the cause more effectively.
nociSoftware Engineer
Distinguished Expert 2018
Commented:
From the RFC: 793, pg 20.

TIME-WAIT - represents waiting for enough time to pass to be sure
    the remote TCP received the acknowledgment of its connection
    termination request.

So this is the normal state after a link has been closed.  Actually it is to prevent accidentally closing a new connection by old packets.
The time normally is 2 minutes.
This probably has little to do with slowness, unless you have >40K connections running.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial