APP access exception or timeout on Alibaba Cloud ECS

App access to ECS connection timeout or slow access:

Specific situation description:

1. There are two versions of Android and iOS apps. When Android accesses and deploys APIs on Alibaba Cloud ECS, timeouts and slow access often occur.

2. The timeout problem and slow access to the Android API on Alibaba Cloud ECS mainly occur when accessing through the company's WiFi network;

3. When other places or APP users access the Android API on Alibaba Cloud ECS through WiFi, the access is normal;

4. When the Android access API times out and the access is slow, immediately turn off the Wifi and switch to the mobile data network, and the access is normal;

 

reason:

The reason why the access to the APP on Alibaba Cloud ECS is timed out or slow is because the timestamps of the TCP packets sent from the mobile terminal are chaotic, so the server discards these packets.

 

solution:

#vim /etc/sysctl.config

net.ipv4.tcp_tw_recycle  = 0 // If net.ipv4.tcp_tw_recycle is set to 1, it is enabled! Set to 0 to close! record timestamp

#sysctl  -p

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325340554&siteId=291194637