You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 14, 2023. It is now read-only.
RuntimeError Exception "threads can only be started once" #9
I created 2 handlers and two loggers using the logentries on my Django project.
When I start my celery worker, I geting RuntimeError "threads can only be started once".
I'm using:
django 1.5
celery 3.1.7
Track:
File "/home/user/.virtualenvs/celery3.1/local/lib/python2.7/site-packages/celery/worker/__init__.py", line 206, in start
self.blueprint.start(self)
File "/home/user/.virtualenvs/celery3.1/local/lib/python2.7/site-packages/celery/bootsteps.py", line 123, in start
step.start(parent)
File "/home/user/.virtualenvs/celery3.1/local/lib/python2.7/site-packages/celery/bootsteps.py", line 373, in start
return self.obj.start()
File "/home/user/.virtualenvs/celery3.1/local/lib/python2.7/site-packages/celery/worker/consumer.py", line 270, in start
blueprint.start(self)
File "/home/user/.virtualenvs/celery3.1/local/lib/python2.7/site-packages/celery/bootsteps.py", line 123, in start
step.start(parent)
File "/home/user/.virtualenvs/celery3.1/local/lib/python2.7/site-packages/celery/worker/consumer.py", line 469, in start
info('Connected to %s', c.connection.as_uri())
File "/usr/lib/python2.7/logging/__init__.py", line 1140, in info
self._log(INFO, msg, args, **kwargs)
File "/usr/lib/python2.7/logging/__init__.py", line 1258, in _log
self.handle(record)
File "/usr/lib/python2.7/logging/__init__.py", line 1268, in handle
self.callHandlers(record)
File "/usr/lib/python2.7/logging/__init__.py", line 1308, in callHandlers
hdlr.handle(record)
File "/usr/lib/python2.7/logging/__init__.py", line 748, in handle
self.emit(record)
File "/home/user/Dropbox/workspace/paas/appfog/soar-site/logentries/utils.py", line 132, in emit
self._thread.start()
File "/usr/lib/python2.7/threading.py", line 488, in start
raise RuntimeError("threads can only be started once")
RuntimeError: threads can only be started once
I think that one solution for this problem is copy the logentries source code to project. I did it.
Other option repored by @ilonajulczuk is define a log internally in the project, based on logentries.
Activity
StephenHynes7 commentedon Feb 24, 2015
Should be fixed in the latest version. https://pypi.python.org/pypi/Logentries
adambyrtek commentedon Aug 6, 2015
I can reproduce this with Logentries 0.7 (using RQ workers not Celery).
thenikso commentedon Sep 17, 2015
we are having this same issue with Celery and
Logentries==0.15nielsonsantana commentedon Sep 24, 2015
I think that one solution for this problem is copy the logentries source code to project. I did it.
Other option repored by @ilonajulczuk is define a log internally in the project, based on logentries.
lucasrcosta commentedon Sep 28, 2015
Same with celery workers and version
0.15.@StephenHynes7 can you reopen this?
adambyrtek commentedon Sep 28, 2015
Just in case somebody is interested, in the end we dropped this library completely and went with syslog-based approach.
sivabudh commentedon Apr 3, 2016
I'm also running into the same issue. Too bad.