Why nginx .sock file failed everyday?

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.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


It sounds like the service is stopping. Try this to see if you get any clear error output:

journalctl -u myproject.service