Giter Club home page Giter Club logo

Comments (10)

ulf avatar ulf commented on July 22, 2024

After countless brainfucking hours of debugging I at least found a workaround: Add an explicit import of the sentry.client.models to the WSGI Handler

class WSGIHandler(base.BaseHandler):                                                                                 
    initLock = Lock()                                                                                                
    request_class = WSGIRequest                                                                                      

    def __call__(self, environ, start_response):                                                                     
        from django.conf import settings                                                                             
        __import__('sentry.client.models') #Add this here...

from sentry.

dcramer avatar dcramer commented on July 22, 2024

Did you add sentry.client to your INSTALLED_APPS?

from sentry.

ulf avatar ulf commented on July 22, 2024

yes, I did. I did not worry about this for quite some time, maybe I check back with the current version...

from sentry.

jonathanslenders avatar jonathanslenders commented on July 22, 2024

Hi, I happen to get the same error. Sentry works perfect with runserver at production.
Uwsgi/nginx also works perfect as long as no exceptions are thrown, but as soon as exception is thrown, nothing is returned to the browser and nginx returns after 60 seconds a 504 gateway timeout. The import trick in the WSGIHandler did not work for me.

from sentry.

jonathanslenders avatar jonathanslenders commented on July 22, 2024

I could trace the error to something in HttpResponse.raw_post_data. content_length equals zero and self.read blocks in there.
SentryClient.process accesses raw_post_data

See django/http/init.py

from sentry.

jonathanslenders avatar jonathanslenders commented on July 22, 2024

See:
http://groups.google.com/group/django-developers/browse_thread/thread/6e9fa9a919e8a471

from sentry.

avostryakov avatar avostryakov commented on July 22, 2024

Thanks, jonathan!

Upgrade to uwsgi 0.9.8.3 really helps but one problem continue to exists: in /sentry admin I can't mark exception as resolved. Nothing happens when a check box button is pressed. Of course without uwsgi all works correctly. So the problem is in uwsgi + sentry.

from sentry.

crisisking avatar crisisking commented on July 22, 2024

I just upgraded to uwsgi 0.9.9.2 and everything seems to be working, though I haven't done much testing. My app no longer hangs, and the Sentry web interface works.

from sentry.

dcramer avatar dcramer commented on July 22, 2024

Awesome. Looks like we need to update the docs with some compatibility notes on version reqs

from sentry.

heyman avatar heyman commented on July 22, 2024

There's actually two problems that are being discussed in this issue. I had them both.

The first one was the one that ulf describes in his first two comments. When running under uwsig, the models file never gets loaded, even though "raven.contrib.django" is in INSTALLED_APPS. I solved it by adding a manual import of raven.contrib.django.models in my wsgi-file.

The second problem was the one with uwsgi having hanging when accessing raw_post_data, and that one was solved by upgrading uwsgi (which was a pain in the ass, since I was previously using an ubuntu package, and now I had to create my own upstart files etc).

from sentry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.