Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

error: can't start new thread #19

Closed

Description

@akarl

The logger.warning(e) happens in a loop and this can try to send a lot of logs.

Traceback:

File "[...]/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 114, in get_response 
response = wrapped_callback(request, *callback_args, **callback_kwargs) 

File "[...]/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view 
return self.dispatch(request, *args, **kwargs) 

File "[...]/local/lib/python2.7/site-packages/newrelic-2.40.0.34/newrelic/hooks/component_djangorestframework.py", line 8, in _nr_wrapper_APIView_dispatch_ 
return wrapped(*args, **kwargs) 

File "[...]/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view 
return view_func(*args, **kwargs) 

File "[...]/local/lib/python2.7/site-packages/rest_framework/views.py", line 400, in dispatch 
response = self.handle_exception(exc) 

File "[...]/local/lib/python2.7/site-packages/rest_framework/views.py", line 397, in dispatch 
response = handler(request, *args, **kwargs) 

File "./api/views/filemanager.py", line 49, in get 
return Response(serializer.list_files_in_folder(path, images_only), 200) 

File "./api/serializers/filemanager.py", line 156, in list_files_in_folder 
logger.warning(e) 

File "/usr/lib/python2.7/logging/__init__.py", line 1152, in warning 
self._log(WARNING, 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 "[...]/local/lib/python2.7/site-packages/logentries/utils.py", line 124, in emit 
self._thread.start() 

File "/usr/lib/python2.7/threading.py", line 494, in start 
_start_new_thread(self.__bootstrap, ()) 

error: can't start new thread 

Activity

  1. StephenHynes7 commented on Feb 24, 2015

    @StephenHynes7
    Contributor

    Can you try the latest version? https://pypi.python.org/pypi/Logentries

  2. rsaftoiu commented on May 11, 2015

    @rsaftoiu

    Hi guys,

    Still having this issue with Celery workers - see my comment in #3 - are there any plans to address it? I contacted support, but they just told me it's not a priority.

  3. StephenHynes7 commented on May 11, 2015

    @StephenHynes7
    Contributor

    @rsaftoiu hoping to have a branch hopefully with a fix for this soon. Ill let you know when it's available

  4. rsaftoiu commented on May 11, 2015

    @rsaftoiu

    @StephenHynes7 thanks, appreciate it!

  5. StephenHynes7 commented on May 14, 2015

    @StephenHynes7
    Contributor
  6. rsaftoiu commented on May 14, 2015

    @rsaftoiu

    Thanks @StephenHynes7, I will take a look. We switched from using this to just using syslog though, so not as critical for us anymore. Still appreciate the fix :)

  7. r35krag0th commented on Feb 17, 2016

    @r35krag0th

    Necro bumping to get this pushed upstream to PyPi so I don't have to maintain a copy.

  8. jrhenke commented on Mar 8, 2016

    @jrhenke

    ^^ Seconded. Right now we have to manually apply this patch after installing LE with pip.

  9. drgarcia1986 commented on Apr 5, 2016

    @drgarcia1986
    Contributor

    Maybe the PR #46 solve this issue

  10. 00derek commented on Oct 13, 2016

    @00derek

    hi, still seeing issue after PR #46 in celery workers. Logentries is upgraded to version 0.17 as per advised.

    File "/app/.heroku/python/lib/python2.7/site-packages/logentries/utils.py", line 195, in emit
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions