nginx代理mysql,连接超时断开,communication link failure,The last packet successfully received from the server

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zilaike/article/details/82112877

========================================关于nginx代理mysql的超时断开问题=====================================================

#Load balancer causes "Communications link failure" with JDBC and MySQL    

#The last packet successfully received from the server was 134,912 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.

proxy_timeout  代理时间大一点就好了

events {
    worker_connections  10240;
}

stream {
server {
listen 3306;
proxy_connect_timeout 3600s;
proxy_timeout 36000s;
proxy_pass   127.0.0.1:3306;
}
server {
listen 8889;
proxy_connect_timeout 3600s;
proxy_timeout 36000s;
proxy_pass 127.0.0.1:6379;
}

}

猜你喜欢

转载自blog.csdn.net/zilaike/article/details/82112877