6π
I figured it out. In my gunicorn.service file in /etc/systemd/system/gunicorn i service.
I made a change:Added the time out. Default time out for gunicorn is 30 sec so I updated to 120.
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
User=lisa
Group=nginx
Restart=on-failure
WorkingDirectory=/home/lisa/revcon
ExecStart=/home/lisa/revcon/env/bin/gunicorn --**timeout 120** --workers 5
--bind unix:/home/lisa/revcon/env.sock revcon.wsgi:application
[Install]
WantedBy=multi-user.target
~
And it worked just fine for me.
π€Lisa
3π
Error 502 itβs timeout for gunicorn service
[Service]
User=user
Group=www-data
WorkingDirectory=/home/user/projects/myproject/project
ExecStart=/home/user/projects/myproject/projectenv/bin/gunicorn\
--access-logfile - \
--workers 3 \
--timeout 1000 \ # this
--bind unix:/run/gunicorn.sock \
project.wsgi:application
near error 504 itβs timeout for nginx server:
location /{
include proxy_params;
proxy_read_timeout 1000; # this
proxy_pass http://unix:/run/gunicorn.sock;
}
π€Rustam Pulatov
- [Django]-Intermittent ImportError with Django package
- [Django]-Framework/Language for new web 2.0 sites (2008 and 2009)
- [Django]-Sprinkling VueJs components into Django templates
- [Django]-How to use has_object_permission with APIView in Django Rest Framework?
- [Django]-Fresh mysql database getting "mydb.background_task doesn't exist" β Django
Source:stackexchange.com