All Products
Search
Document Center

Linux instance UDP cache overflow causes remote connection failure

Last Updated: Dec 30, 2020

Problem description

An overflow in the UDP cache of a Linux instance may affect the network performance of the Linux instance and thus the instance cannot connect remotely.

Cause

The value of the /etc/sysctl.conf in the net.ipv4.udp_mem file is set too low. The /etc/sysctl.conf file stores system configuration information. If parameters are incorrectly configured, the network performance of Linux instances may be affected.

Solution

Alibaba Cloud reminds you that:

  • Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
  • You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
  • If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.
  1. Remotely log on to the Linux instance through VNC. For more information about how to log on remotely, see ECS connection methods overview.
  2. Run the following command to edit the /etc/sysctl.conf file:
    Note: back up the data before modifying the configuration file.
    vim /etc/sysctl.conf
  3. Press A to adjust the value of the net.ipv4.udp_mem parameter as needed. Then, press Esc to exit the edit mode. Enter : WQ and press Enter. Save and exit.
    Description
    • : WQ in colon : Need to press Shift+: Key output.
    • In this topic, the value of the net.ipv4.udp_mem parameter is 819213107267108864. Adjust the value as needed.
    A similar output is displayed.
    {F8B1F28E-D89D-42BF-B1B9-8D99F157B03C}_20200714180457 (1).jpg
  4. Run the following command to make the configuration take effect.
    sysctl -p

Application scope

  • Elastic Compute Service