Not working with django 1.4

Issue #10 invalid
Harp B created an issue

I installed django 1.4, added DogSlow middleware and included some sleep statements. I ran a http request but it did not got killed - it succeeded.

I also tried it with django 1.3 and it still did not work. Is there anyway to debug why the thread is not being killed?

Comments (8)

  1. Harp B reporter

    The dogslow 0.9.2 caused issue. Using the dev source code in order to resolve it. Could you do a 0.9.3?

  2. Harp B reporter
    • changed status to open

    Could you gracefully handle following issue:

      File "/mnt/work/checkout/socialize_integration/_install/local/lib/python2.7/site-packages/django/test/client.py", line 74, in __call__
        self.load_middleware()
      File "/mnt/work/checkout/socialize_integration/_install/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 53, in load_middleware
        mw_instance = mw_class()
      File "/mnt/work/checkout/socialize_integration/_install/local/lib/python2.7/site-packages/dogslow/__init__.py", line 89, in __init__
        self.timer.start()
      File "/usr/lib/python2.7/threading.py", line 495, in start
        _start_new_thread(self.__bootstrap, ())
    error: can't start new thread
    

    It is happening because I am running a collection integration tests and it seems to be spawning new thread for every test.

  3. Erik van Zijst repo owner

    Just to be clear: dogslow never kills anything. It only takes a snapshot of the request thread's stack and logs that. It is not meant to interfere with anything at runtime.

  4. Erik van Zijst repo owner

    @harpb I'm closing this as invalid as there seem to be no problems running on Django 1.4.x.

    As for the threading, feel free to raise an issue for that, but that would seem to be happening because your tests instantiate many instances of your middleware classes.

    Not sure how you'd want to change this in Dogslow?

  5. Log in to comment