Report this

What is the reason for this report?

Why nginx .sock file failed everyday?

Posted on March 16, 2019

I run a Nginx on Ubuntu 18.04 with Python and Flask…I follow this 2 tutorial.

  1. How To Install Nginx on Ubuntu 18.04
  2. How To Serve Flask Applications with uWSGI and Nginx on Ubuntu 18.04

But everyday I check my application,the request always Server Internal Error 500. My application is new,just run for 3 days.But the server keep failed.This happen everyday.

After I run this command,it works again.

sudo systemctl restart myproject

But come on,I need to restart the server everyday??

Here is the result get when I check the /var/log/nginx/error.log.1

2019/03/13 14:47:47 [crit] 7277#7277: *1 connect() to unix:/var/www/html/myproject/myproject.sock failed (2: No such file or directory) while connecting to upstream, client: “some_ip”, server: , request: “GET /favicon.ico HTTP/1.1”, upstream: “uwsgi://unix:/var/www/html/myproject/myproject.sock:”, host: “some_ip”, referrer: “some_ip”

And at the same time the report when I login to putty is feel weird…

Here is the log when I login to Putty

It said usage of 8.8% and Memory usage 41%,I mean my application just 1 file and serve for only 3 days with few user for this moment,is this a normal situation?

This situation happen already 3 days…Everyday I need to key in the command to restart the server.Can somebody let me know?

Cause I dont want to end up get this ->> ** Networking Disabled** and this situation happened last time which make me need to set up the whole thing again.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.