Skip to content

How to fix Open Socket error?

0

Please, I need someone to help me fix the error log I am currently experiencing.

My nginx.service works fine when I run systemctl status nginx.service

But I end up having the error displayed whenever I sudo tail - f /var/log/nginx/error.log

Error:

2024/09/17 03:17:16 [alert] 30779#30779: *56 open socket #10 left in connection 6 2024/09/17 03:17:16 [alert] 30779#30779: aborting 2024/09/17 06:26:41 [notice] 32817#32817: using inherited sockets from "5;6;7;"

Please, I need all the help I can get. I am tired and exhausted already.

asked 2 years ago804 views
1 Answer
0

As per my research you can check this things :-

Configuration Issues: Ensure that your Nginx configuration documents are efficiently installation. A misconfiguration can every now and then result in socket troubles. Running nginx -t can assist become aware of syntax errors or configuration troubles.

Socket Exhaustion: It’s feasible that Nginx or the system ran out of available sockets. Check your machine's limits on document descriptors and sockets and growth them if essential. You can regulate the ulimit settings or /and many others/safety/limits.Conf for continual modifications.

Resource Cleanup: Sometimes, if Nginx isn't always shut down nicely or if there are lingering connections, those can lead to issues. Make positive that Nginx and any associated services are being nicely stopped and restarted.

Bug or Version Issue: Ensure which you are the use of a solid model of Nginx. Check the Nginx changelogs or boards for any similar issues reported in the version you are the use of. Upgrading to a more recent version can also clear up the difficulty if it’s a recognized computer virus.

Check Logs: Review the Nginx mistakes logs and device logs for any additional context or associated mistakes that would supply greater insight into what went wrong.

Let me know if the issue is still persist so, i can help you accordingly

answered 2 years ago
  • Thank you very much for your response. I've checked and ensured everything you said but I still get the same error

    I have also increased my file descriptor to 65536, and has also been updated in ulimit settings.

    My nginx.service works fine when I run status

    Here is what my nginx configuration looks like:

    server { server_name adimeals.com www.adimeals.com; #server_name 192.168.0.1 yourdomain.com your_alternate_domain.com; this is how you can add multiple hosts. Do not add any comma jus>

    location / {
        include proxy_params;
        proxy_pass http://unix:/home/ubuntu/ADi-meals-mobile/app.sock;
    }
    
    location /image/ {
        alias /home/ubuntu/ADi-meals-mobile/image/media/;
    }
    
    location /static/ {
        root /home/ubuntu/ADi-meals-mobile/staticfiles/;
        try_files $uri $uri/ =404;
    }
    

    #here I already have certbot manage http/www request for me, so the site handles https correctly. }

    Here is a link to the site: adimeals.com

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.