Hello. I am running nginx + uwsgi 2.0.15 + mysql 5.5.55 application. Each
time uwsgi respawns worker I get following error in logs (and 502 in
browser):
Sat Jun 17 16:38:22 2017 - Respawned uWSGI worker 1 (new pid: 9021)Sat
Jun 17 16:38:22 2017 - SIGPIPE: writing to a closed pipe/socket/fd
(probably the client disconnected) !!!Traceback (most recent call
last):
File
"/home/hikesadmin/.local/lib/python3.4/site-packages/django/core/handlers/wsgi.py",
line 157, in __call__
signals.request_started.send(sender=self.__class__, environ=environ)
File
"/home/hikesadmin/.local/lib/python3.4/site-packages/django/dispatch/dispatcher.py",
line 191, in send
response = receiver(signal=self, sender=sender, **named)
File
"/home/hikesadmin/.local/lib/python3.4/site-packages/django/db/__init__.py",
line 61, in close_old_connections
conn.close_if_unusable_or_obsolete()
File
"/home/hikesadmin/.local/lib/python3.4/site-packages/django/db/backends/base/base.py",
line 504, in close_if_unusable_o
r_obsolete
self.close()
File
"/home/hikesadmin/.local/lib/python3.4/site-packages/django/db/backends/base/base.py",
line 272, in close
self._close()
File
"/home/hikesadmin/.local/lib/python3.4/site-packages/django/db/backends/base/base.py",
line 221, in _close
return self.connection.close()
File
"/home/hikesadmin/.local/lib/python3.4/site-packages/pymysql/connections.py",
line 734, in close
sock.close()AttributeError: 'NoneType' object has no attribute 'close'
After worker is started the application works properly.
UWSGI app config:
[uwsgi]
uid = hikesadmin
env = HOME=/home/hikesadmin
env = LANG=en_US.UTF-8
processes = 1
threads = 2auto-procname = 1
cheap = 1
idle = 60
harakiri = 30
vacuum = 1
chdir = /home/hikesadmin/engine
wsgi-file = hike_engine/wsgi.py
touch-reload = hike_engine/wsgi.py
logto=/tmp/hikes.log# log-maxsize=1048576
daemonize=/tmp/hikes.log
disable-logging=True
*Why these errors occur? How can I trace the roots of the problem?*
Thanks :)
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi