By Lea Cards
Deploying a django project to my droplet I encounter a gunicorn issue:
curl --unix-socket /run/gunicorn.sock localhost
curl: (56) Recv failure: Connection reset by peer
This error is raised when by the command:
curl --unix-socket /run/gunicorn.sock localhost
According to online forums, this issue is related to the path of my gunicon. gunicron-path
However, my gunicron is set exactly by this path:
That is the file -sudo nano /etc/systemd/system/gunicorn.service
displays:
[Unit]
Description=gunicorn daemon
Requires=gunicorn.socket
After=network.target
[Service]
User=nuser
Group=www-data
WorkingDirectory=/home/nuser/pipit
ExecStart=/home/nuser/pipit/.venv/bin/gunicorn \
--access-logfile - \
--workers 3 \
--bind unix:/run/gunicorn.sock \
pipit.wsgi:application
[Install]
WantedBy=multi-user.target
Any advise as on how I can fix it would be highly appreciated.
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!
Hey @leacards,
Usually, the error # Connection reset by peer is related to your Application as a whole rather than configuration.
Check the logs of your Gunicorn application as well as the Nginx logs to see for a more concrete error.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.