Closed LeeKevin closed 4 years ago
Any chance you are adding a the very same timer multiple times at runtime? Is the decorated function imported in a separated file from your django app via a settings like import = <yourmodule>
?
Also looks like you are doing something fishy there:
unable to load configuration from from multiprocessing.semaphore_tracker import main;main(17)
Any chance you are adding a the very same timer multiple times at runtime?
Good point. I will test for this.
Is the decorated function imported in a separated file from your django app via a settings like import =
?
The decorated functions are declared directly in the my wsgi.py file where the django app is created:
wsgi.py
import os
import traceback
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "MY_APP.settings")
from django.conf import settings
from django.utils import timezone
if settings.DEBUG and settings.DEVELOPMENT:
from ws4redis.django_runserver import application
application = application
else:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
try:
import uwsgidecorators
from django.core.management import call_command
# Send mail
@uwsgidecorators.lock
@uwsgidecorators.timer(30)
def send_queued_mail(*args, **kwargs):
...
...
Is that bad practice? Would appreciate input on that.
Also looks like you are doing something fishy [with multiprocessing]
I looked through my app and I see that the multiprocessing
module is imported once in "deeper" part of the application. It's used in a function to check the number of cpus. Any potential issues with that import?
The documentations suggests to use a separeted file: https://uwsgi-docs.readthedocs.io/en/latest/PythonDecorators.html
Excellent, that's the kind of thing I was looking for.
I will fix my application and close the issue once all looks good.
Could you tell me how to solve this problem? It just drives me crazy!
I have a Django application running with uWSGI.
Sometimes, when restarting the uWSGI service, I get a bunch of
*** SIGNAL QUEUE IS FULL: buffer size 212992 bytes (you can tune it with --signal-bufsize) ***
errors.When that happens, I'm unable to access the Django app. Restarting uWSGI again usually works.
Any ideas what happening here?
On startup of my application, I have a bunch of crons and timers that are initialized, like:
The full output of the wsgi process is below: