G
G
Grigory Dikiy2016-02-11 09:21:37
Nginx
Grigory Dikiy, 2016-02-11 09:21:37

Is the server running slowly?

Good day, yesterday I set up the server and my joy knew no bounds, but the transition through the pages is not always carried out quickly, that is, sometimes at lightning speed, and sometimes well, right for 40 seconds. I suspect that the problem is in uwsgi, since it always returns statics quickly and without questions. The server itself, although with a minimal configuration, still has gunpowder:
8ff3b3afdd4547188fd4c3b55964f2fd.pngf247ec901d0b4261b33126b9a762f95f.png
The second picture shows that sometimes everything works quickly, sometimes slowly.
uwsgi.ini

#mysite_uwsgi.ini file
[uwsgi]

# Django-related settings
# the base directory (full path)
chdir           = /data/mysite/project
# Django's wsgi file
wsgi-file       = /data/mysite/project/mysite/wsgi.py
# the virtualenv (full path)
home            = /data/mysite/venv/mysite

# process-related settings
# master
master          = True
# maximum number of worker processes
processes       = 10
# the socket
socket          = /tmp/mysite.sock
# ... with appropriate permissions - may be needed
chmod-socket    = 666
# clear environment on exit
vacuum          = true
# account to start process
uid             = root
gid             = root
# Output messages to log
daemonize=/var/log/uwsgi/mysite.log

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2016-02-11
@frilix

what is this: /var/log/uwsgi/mysite.log ?
and this, is it necessary to run the workers under root? it's a bit unsafe...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question