V
V
Vic Shostak2017-02-01 08:51:21
Django
Vic Shostak, 2017-02-01 08:51:21

How to fix FATAL Exited too quickly error when deploying Django to VDS?

Guys! Help django noob please.. Stuck for a day on this problem (which is not googled yet). System: Debian 8x64, CPU core 1 pc., RAM 2 GB. Python 3.4 + Django 1.10.x.
I do everything according to this manual: djbook.ru/examples/62 (one to one, step by step), but at the moment with the launch of supervisorctl, this comes out:
myproject FATAL Exited too quickly (process log may have details)
I tried to restart VDS and again (fortunately a clean test server) from scratch the OS rolled and repeated according to that manual, but one fig .. exactly the same phrase is written in the logs.
Help me please! Maybe there is another way to run on VDS (other than uWSGI)? I would like to try to deploy it on the web, and not just drive it on the LAN.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vic Shostak, 2017-09-10
@vikkyshostak

This tutorial helped: https://www.digitalocean.com/community/tutorials/h...

A
Artyom Innokentiev, 2017-02-01
@artinnok

Try to start without a supervisor - nginx, your Django project. Proxy the request from nginx to port 8000 of the local djanga server. This is the first iteration.
Then screw on the gunicorn. Now nginx will proxy requests to gunicorn, and it will run your project. This is the second iteration.
Then supervisor. Now the supervisor will pick up the gunicorn from under him, nginx works offline. For a start, this is enough for you.
nginx:

server {
  listen 80;
  server_name example.com; #либо ip, либо доменное имя

  location / {
      proxy_pass http://127.0.0.1:8000;
      proxy_set_header Host $server_name;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
}

django:
python manage.py runserver

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question