Help Center> Virtual Private Cloud> FAQ> Connectivity> What Do I Do If Intermittent Interruption Occurs When a Local Host Accesses a Website Built on an ECS?

What Do I Do If Intermittent Interruption Occurs When a Local Host Accesses a Website Built on an ECS?

After a website is built on an ECS, some users occasionally fail to access the website through the local network.

Fault Locating

  1. Check the local network of the user.

    If the local host communicates with the ECS using NAT, this problem may occur.

  2. Run the following command to check whether tcp_tw_recycle is enabled on the ECS:

    sysctl -a|grep tcp_tw_recycle

    The value of tcp_tw_recycle is 1, indicating the function is enabled.

  3. Run the following command to check the number of lost packets of the ECS:

    cat /proc/net/netstat | awk '/TcpExt/ { print $21,$22 }'

    If the value of ListenDrops is not 0, packet loss occurs, that is, the network is faulty.

Troubleshooting Procedure

This problem can be solved by modifying the kernel parameters of the ECS.
  • Run the following command to temporarily modifying the parameters (the modification becomes invalid after the ECS is restarted):

    sysctl -w net.ipv4.tcp_tw_recycle=0

  • Perform the following operations to permanently modify the parameters:
    1. Run the following command and modify the /etc/sysctl.conf file:

      vi /etc/sysctl.conf

      Add the following content to the file:

      net.ipv4.tcp_tw_recycle=0

    2. Press Esc, enter :wq!, and save the file and exit.
    3. Run the following command to make the modification take effect:

      sysctl -p