求教golang中http发送post请求gb2312编码的解决方案
1个回答
展开全部
解决的办法,在 /etc/sysctl.conf加入下面几句话
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 1024 65000 ## 端口分配范围
net.ipv4.tcp_max_tw_buckets = 5000 ## 设置"time_wait"的桶最多容纳5000个
添加完毕以后
sysctl -p 让以上配置生效
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 1024 65000 ## 端口分配范围
net.ipv4.tcp_max_tw_buckets = 5000 ## 设置"time_wait"的桶最多容纳5000个
添加完毕以后
sysctl -p 让以上配置生效
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询