ERPNext + Nginx Error

Good Day

Browsers are getting inresponsive after a while of working on system.
When i restart server then it ok for a while until it fails again (inresponsive).

I get following log from nginx Error Log:

2018/03/01 18:24:01 [error] 1326#1326: *830 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.20.151, server: testing, request: “POST / HTTP/1.1”, upstream: “http://127.0.0.1:8000/”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:31 [error] 1315#1315: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPAd- HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPAd-”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:31 [error] 1315#1315: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YP465 HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YP465”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:31 [error] 1315#1315: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YP4DQ HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YP4DQ”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:33 [error] 1315#1315: *18 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.151, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPDHH HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPDHH”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:33 [error] 1315#1315: *20 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.40, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPDdx HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPDdx”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:33 [error] 1315#1315: *17 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.49, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPDCu HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPDCu”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:34 [error] 1315#1315: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPDWy HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPDWy”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:34 [error] 1315#1315: *16 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPDXc HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPDXc”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:34 [error] 1315#1315: *25 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPEZ- HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPEZ-”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:36 [error] 1315#1315: *18 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.151, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPDmJ HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPDmJ”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:36 [error] 1315#1315: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.72, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPDWD HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPDWD”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:36 [error] 1315#1315: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPEo6 HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPEo6”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 18:28:36 [error] 1315#1315: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPEr6 HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPEr6”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 18:28:36 [error] 1315#1315: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPD_P HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPD_P”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:37 [error] 1315#1315: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPF4b HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPF4b”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 18:28:37 [error] 1315#1315: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPF4u HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPF4u”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 18:28:39 [error] 1315#1315: *20 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.40, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPEsd HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPEsd”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:39 [error] 1315#1315: *17 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.49, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPERS HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPERS”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:40 [error] 1315#1315: *16 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPEmp HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPEmp”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:40 [error] 1315#1315: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPEnA HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPEnA”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:40 [error] 1315#1315: *25 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPFoV HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPFoV”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:41 [error] 1315#1315: *18 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.151, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPE-h HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPE-h”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:41 [error] 1315#1315: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.72, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPElG HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPElG”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:41 [error] 1315#1315: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPG3O HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPG3O”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 18:28:42 [error] 1315#1315: *16 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPFEK HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPFEK”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:42 [error] 1315#1315: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPGG0 HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPGG0”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 18:28:43 [error] 1315#1315: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPGYV HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPGYV”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 18:28:43 [error] 1315#1315: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPGYo HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPGYo”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 18:28:44 [error] 1315#1315: *20 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.40, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPG5J HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPG5J”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:44 [error] 1315#1315: *17 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.49, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPFfy HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPFfy”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:45 [error] 1315#1315: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPG0S HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPG0S”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:45 [error] 1315#1315: *16 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YPG0Z HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YPG0Z”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 18:28:45 [error] 1315#1315: *54 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.92, server: testing, request: “GET /api/method/frappe.async.get_user_info?sid=ea7513ab61fee896780e76fdced5028d6b06bf620d8cd254f5a22d3f HTTP/1.1”, upstream: “http://127.0.0.1:8000/api/method/frappe.async.get_user_info?sid=ea7513ab61fee896780e76fdced5028d6b06bf620d8cd254f5a22d3f”, host: “192.168.20.92:8081”
2018/03/01 18:28:46 [error] 1315#1315: *60 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.92, server: testing, request: “GET /api/method/frappe.async.get_user_info?sid=ed22e4465ab05b315204e43a02dd380b612b803c53694b420dc39164 HTTP/1.1”, upstream: “http://127.0.0.1:8000/api/method/frappe.async.get_user_info?sid=ed22e4465ab05b315204e43a02dd380b612b803c53694b420dc39164”, host: “192.168.20.92:8081”
2018/03/01 18:28:46 [error] 1315#1315: *63 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.92, server: testing, request: “GET /api/method/frappe.async.get_user_info?sid=707c8b79d2e5198764d9baed3a4c7b5d7263aff440b5de3ce23f2eed HTTP/1.1”, upstream: “http://127.0.0.1:8000/api/method/frappe.async.get_user_info?sid=707c8b79d2e5198764d9baed3a4c7b5d7263aff440b5de3ce23f2eed”, host: “192.168.20.92:8081”
2018/03/01 18:28:46 [error] 1315#1315: *69 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.92, server: fifth, request: “GET /api/method/frappe.async.get_user_info?sid=2fc41e6a5694708a4692402d2407374fda728b14f8352968ea0dfd2f HTTP/1.1”, upstream: “http://127.0.0.1:8000/api/method/frappe.async.get_user_info?sid=2fc41e6a5694708a4692402d2407374fda728b14f8352968ea0dfd2f”, host: “192.168.20.92:8083”
2018/03/01 18:28:47 [error] 1315#1315: *75 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.92, server: testing, request: “GET /api/method/frappe.async.get_user_info?sid=2278c8ece98b107d9fceba463654d7ca23fbf4e556e3a56b1f9366ab HTTP/1.1”, upstream: “http://127.0.0.1:8000/api/method/frappe.async.get_user_info?sid=2278c8ece98b107d9fceba463654d7ca23fbf4e556e3a56b1f9366ab”, host: “192.168.20.92:8081”
2018/03/01 18:28:49 [error] 1315#1315: *85 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.92, server: testing, request: “GET /api/method/frappe.async.get_user_info?sid=77ab3267c6270a9cda1cf4e2e89853dfb6634744f106146e8725b65e HTTP/1.1”, upstream: “http://127.0.0.1:8000/api/method/frappe.async.get_user_info?sid=77ab3267c6270a9cda1cf4e2e89853dfb6634744f106146e8725b65e”, host: “192.168.20.92:8081”
2018/03/01 18:28:49 [error] 1315#1315: *87 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.153, server: testing, request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:8000/”, host: “192.168.20.92:8081”
2018/03/01 18:28:49 [error] 1315#1315: *101 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.92, server: testing, request: “GET /api/method/frappe.async.get_user_info?sid=8e93b55e560cc8147acffc248e6ddc20356b94f4de70fc0465d9dcd9 HTTP/1.1”, upstream: “http://127.0.0.1:8000/api/method/frappe.async.get_user_info?sid=8e93b55e560cc8147acffc248e6ddc20356b94f4de70fc0465d9dcd9”, host: “192.168.20.92:8081”
2018/03/01 18:28:52 [error] 1315#1315: *87 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.153, server: testing, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://127.0.0.1:8000/favicon.ico”, host: “192.168.20.92:8081”
2018/03/01 18:28:52 [error] 1315#1315: *87 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.153, server: testing, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://127.0.0.1:8000/favicon.ico”, host: “192.168.20.92:8081”
2018/03/01 19:01:22 [error] 1316#1316: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWjxp HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWjxp”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:23 [error] 1316#1316: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWjhl HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWjhl”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:23 [error] 1316#1316: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWjmj HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWjmj”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:23 [error] 1316#1316: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.40, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWkVX HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWkVX”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:23 [error] 1316#1316: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWkcz HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWkcz”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:23 [error] 1316#1316: *11 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWkpc HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWkpc”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:23 [error] 1316#1316: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWl33 HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWl33”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:23 [error] 1316#1316: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWlR8 HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWlR8”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:26 [error] 1316#1316: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWm4e HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWm4e”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:29 [error] 1316#1316: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWmRN HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWmRN”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:29 [error] 1316#1316: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.40, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWlnV HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWlnV”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:29 [error] 1316#1316: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWlUe HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWlUe”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:29 [error] 1316#1316: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWlUh HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWlUh”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:29 [error] 1316#1316: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWlUm HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWlUm”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:30 [error] 1316#1316: *11 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWmg- HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWmg-”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:30 [error] 1316#1316: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWmgz HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWmgz”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:30 [error] 1316#1316: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWmn4 HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWmn4”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:32 [error] 1316#1316: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWnIw HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWnIw”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:34 [error] 1316#1316: *11 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWnfe HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWnfe”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:34 [error] 1316#1316: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.40, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWn0C HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWn0C”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:34 [error] 1316#1316: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWmj- HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWmj-”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:34 [error] 1316#1316: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWmk- HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWmk-”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:34 [error] 1316#1316: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWmlF HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWmlF”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:36 [error] 1316#1316: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWo91 HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWo91”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:36 [error] 1316#1316: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWoF7 HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWoF7”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:36 [error] 1316#1316: *11 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWoGB HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWoGB”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:37 [error] 1316#1316: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWoXL HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWoXL”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:39 [error] 1316#1316: *10 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.253, server: fifth, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWotx HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWotx”, host: “192.168.20.92:8083”, referrer: “http://192.168.20.92:8083/desk
2018/03/01 19:01:39 [error] 1316#1316: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.40, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWoEj HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWoEj”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:39 [error] 1316#1316: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWnzL HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWnzL”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:39 [error] 1316#1316: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWnz7 HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWnz7”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:39 [error] 1316#1316: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.55, server: testing, request: “GET /socket.io/?EIO=3&transport=polling&t=M7YWn-P HTTP/1.1”, upstream: “http://127.0.0.1:9000/socket.io/?EIO=3&transport=polling&t=M7YWn-P”, host: “192.168.20.92:8081”, referrer: “http://192.168.20.92:8081/desk
2018/03/01 19:01:42 [error] 1316#1316: *55 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.92, server: fifth, request: “GET /api/method/frappe.async.get_user_info?sid=Guest HTTP/1.1”, upstream: “http://127.0.0.1:8000/api/method/frappe.async.get_user_info?sid=Guest”, host: “192.168.20.92:8083”
2018/03/01 19:01:43 [error] 1316#1316: *67 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.92, server: testing, request: “GET /api/method/frappe.async.get_user_info?sid=ea7513ab61fee896780e76fdced5028d6b06bf620d8cd254f5a22d3f HTTP/1.1”, upstream: “http://127.0.0.1:8000/api/method/frappe.async.get_user_info?sid=ea7513ab61fee896780e76fdced5028d6b06bf620d8cd254f5a22d3f”, host: “192.168.20.92:8081”
2018/03/01 19:01:44 [error] 1316#1316: *76 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.92, server: testing, request: “GET /api/method/frappe.async.get_user_info?sid=77ab3267c6270a9cda1cf4e2e89853dfb6634744f106146e8725b65e HTTP/1.1”, upstream: “http://127.0.0.1:8000/api/method/frappe.async.get_user_info?sid=77ab3267c6270a9cda1cf4e2e89853dfb6634744f106146e8725b65e”, host: “192.168.20.92:8081”
2018/03/01 19:01:44 [error] 1316#1316: *83 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.20.92, server: testing, request: “GET /api/method/frappe.async.get_user_info?sid=2278c8ece98b107d9fceba463654d7ca23fbf4e556e3a56b1f9366ab HTTP/1.1”, upstream: “http://127.0.0.1:8000/api/method/frappe.async.get_user_info?sid=2278c8ece98b107d9fceba463654d7ca23fbf4e556e3a56b1f9366ab”, host: “192.168.20.92:8081”
2018/03/01 19:24:31 [alert] 1316#1316: *65 open socket #32 left in connection 10
2018/03/01 19:24:31 [alert] 1316#1316: *73 open socket #29 left in connection 11
2018/03/01 19:24:31 [alert] 1316#1316: *62 open socket #31 left in connection 12
2018/03/01 19:24:31 [alert] 1316#1316: aborting

Could anyone shed light on this?

Thank You

Albertus Geyser

1 Like

Got any solution ?

Good Day

My Solution was this:

I increased my gunicorns.

Thank You

Albertus Geyser

Facing same issue, increased gunicorn worker also to 30, but still “upstream timed out (110: Connection timed out” error is there?
Could you please help out?

1 Like

@trentmu Thanks for your quick revert.
Although i have increased timeout and set it to 36000s which is 10 hours.

" [error] 28026#28026: *45643 connect() failed (110: Connection timed out) while connecting to upstream, client: xxx.xxx.xx.xx, server: xxxxxx."

@Albertus I have changed gunicorn to 30 but still it is same, the root cause i found is : huge requests are being sent to server by client on every event called like: desk notification using socket.io. This is leading request timeout.

if you check sudo supervisorctl status, can you see frappe-bench-node-socketio amongst the programs ?

If not then try this:

bench setup supervisor

then sudo supervisorctl reload

then sudo supervisorctl restart

This is because of frappe-bench-node-socketio not running.

2 Likes

@root13F supervisorctl is working fine and no issues with that.

Issue is we are getting continue “Request time out error in between browsing of erpnext” as a root cause i found that my client machine is sending “cmd:frappe.desk.notifications.get_notifications” requests to server and in quantity these are very huge i mean around 100 per second on 200 client machines, due to this nginx returning 502, 504 and request time out error to client very frequently.

Does this client match the one in nginx’s frappe-bench.conf (it is located in /etc/nginx/conf.d/) named upstream frappe-bench-socketio-server

@root13F Yes, it is there.

now if you check sudo supervisorctl status can you see frappe-bench-node-socketio ?

@root13F yes it is also there ?

Please let me know the cause of “Upstream: Request time out” error !!

These steps helped me with my issue. Thank you so much.

1 Like