question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Django] Requests from iOS time out when raven is enabled

See original GitHub issue

I am having an issue with requests from iOS timing out when Raven is enabled. Any endpoints from my project will time out, but not endpoints that are included from third party apps. The issue disappears when excluding Raven from installed apps. This issue only occurs when sending a request from an iOS app. The same requests made using httpie or Postman are successful.

To make things more complicated, the request only times out on the iOS side. As soon as it times out, Django (or rather runserver) happily reports that the request was successful with a 200 status code.

I apologize for the lack of detailed information or a stack trace, but I have not been able to produce an actual error from the Django application. Please let me know if further information is needed or if you have ideas on things I should investigate further.

URL Structure

As mentioned above, requests for URLs from third-party apps succeed, but any requests to URLs from my project fail.

Base URL File

# project/project/urls.py

urlpatterns = [
    url(r'^foo/', include('foo.urls'),    # Third party application works fine
    url(r'^my-app/', include('my_app.urls'),    # Application defined in my project fails
]

App URL File

# project/my_app/urls.py

app_name = 'my-app'

urlpatterns = [
    url(r'^bar/$', BarView.as_view(), name='bar-detail'),
]

Views

The views from the project are mostly based on DRF’s generic views (eg generics.ListCreateView). I don’t believe the issue lies here, since some of the third-party apps used utilize the same generic views.

Dependency Versions

  • Django 2.0.3
  • Django Rest Framework 3.7.7
  • Raven 6.6.0

Downgrading to 6.1.0 causes the requests to work, but constantly logs errors about URLConf, which I believe is related to the Django 2 support that was 6.2.0 addresses.

Upstream Issue

For reference, the upstream issue I’m trying to fix is knowmetools/km-api#298

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ashwoodscommented, Mar 28, 2018

Thx. I’m not entirely sure why, but I can fix it. On Wed 28. Mar 2018 at 19:20, Brandogs notifications@github.com wrote:

A little extra clarification thank to @cdriehuys https://github.com/cdriehuys . This is happening when the body is set for an endpoint that isn’t expecting it. This occurs if the body is empty or not. In our case, it just happened to be empty because of the default value for parameters.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/getsentry/raven-python/issues/1215#issuecomment-376966621, or mute the thread https://github.com/notifications/unsubscribe-auth/AAW4tWyQ_AjcWXbXviuUPucd5oNPjUXqks5ti8ZigaJpZM4S5TcM .

1reaction
ashwoodscommented, Mar 23, 2018

@cdriehuys Hi Chathan. mind installing a version that doesn’t instrument drf to pinpoint the problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

requests library with timeouts from django app
I am making requests to another micro-service, from my django app, using requests.get(...) , that works fine. I now want to add a...
Read more >
Sentry: Application Performance Monitoring & Error Tracking ...
Self-hosted and cloud-based application performance monitoring & error tracking that helps software teams see clearer, solve quicker, & learn continuously.
Read more >
[Solved]-How to make turn server fast-django - appsloveworld
Coding example for the question How to make turn server fast-django. ... python raven timing out when using django logging from a celery...
Read more >
Testing Guide - OWASP Foundation
ated and instantiated into a working web application). This is generally ... derstanding whether the log out and timeout functions are properly secured....
Read more >
Configuring fast, secure file transfers using Amazon S3 ...
Amazon S3 Transfer Acceleration is a bucket-level feature that enables fast, easy, and secure transfers of files over long distances between your client...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found