Hi, guys.

my server uses uwsgi 1.9.20 and django 1.6


[uwsgi]
base_path = /home/myproject/
logs_path = %(base_path)logs/
tmp_path = %(base_path)tmp/
module = server.manage_uwsgi
uid = www-data
gid = www-data
virtualenv = /home/myproject
master = true
vacuum = true
harakiri-verbose = true
log-x-forwarded-for = true
no-orphans = true
socket = 127.0.0.1:50051
socket = 127.0.0.1:50052
socket = 127.0.0.1:50053
workers = 3
map-socket = 0:1
map-socket = 1:2
map-socket = 2:3
chmod-socket = 774
daemonize = %(logs_path)uwsgi_daemonize.log
logto = %(logs_path)uwsgi_logto.log
memory-report = true
listen = 256
max-requests = 2000
reload-on-as = 1024
reload-on-rss = 1024
log-slow = true
harakiri = 120
limit-as = 1024
gevent = 48
spooler = %(tmp_path)


django databases have
'CONN_MAX_AGE': 600


I use gevent to make some requests to external websites in admin panel.
In addition I use spooler to make internal requests like "prepare some big
.xls file in background".
Gevent cant be used for spooler tasks, because I had problems with django
blocking code style and mysql.


So, I have a problem with spooler requests. Server works fine for 1 day
approximately. Errors occur on the next day. I cant launch spooler
requests. All of them raises a "Mysql server has gone away".


Looks like that its a problem with django persistent connections (
https://docs.djangoproject.com/en/dev/ref/databases/) and mysql
wait_timeout (
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout
)


Request count to admin panel is very low (10 requests max daily)


The most interesting part is that regular GET requests are processed
without any errors. Just a spooler raises errors.
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to