{"action":"created","issue":{"url":"https://api.github.com/repos/getsentry/raven-python/issues/590","labels_url":"https://api.github.com/repos/getsentry/raven-python/issues/590/labels{/name}","comments_url":"https://api.github.com/repos/getsentry/raven-python/issues/590/comments","events_url":"https://api.github.com/repos/getsentry/raven-python/issues/590/events","html_url":"https://github.com/getsentry/raven-python/issues/590","id":65269346,"number":590,"title":"Events are not sent with threaded transport using uWSGI with prefork","user":{"login":"Antwan86","id":3027728,"avatar_url":"https://avatars.githubusercontent.com/u/3027728?v=3","gravatar_id":"","url":"https://api.github.com/users/Antwan86","html_url":"https://github.com/Antwan86","followers_url":"https://api.github.com/users/Antwan86/followers","following_url":"https://api.github.com/users/Antwan86/following{/other_user}","gists_url":"https://api.github.com/users/Antwan86/gists{/gist_id}","starred_url":"https://api.github.com/users/Antwan86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Antwan86/subscriptions","organizations_url":"https://api.github.com/users/Antwan86/orgs","repos_url":"https://api.github.com/users/Antwan86/repos","events_url":"https://api.github.com/users/Antwan86/events{/privacy}","received_events_url":"https://api.github.com/users/Antwan86/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-30T18:11:45Z","updated_at":"2015-03-30T18:31:38Z","closed_at":"2015-03-30T18:31:38Z","body":"Hi,\r\n\r\nWhen trying to send events to the logging server with the default (threaded) transport mode and uWSGI as application server, the events are not sent provided the request is handled by a children spawned process.\r\n\r\nExample :\r\n\r\nThe server :\r\n`uwsgi --http :8080 --module conf.wsgi --home venv --process 2 --enable-threads`\r\n\r\nThe log :\r\n\r\n    *** Operational MODE: preforking ***\r\n    WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x26b9190 pid: 14124 (default app)\r\n    *** uWSGI is running in multiple interpreter mode ***\r\n    spawned uWSGI worker 1 (pid: 14124, cores: 1)\r\n    spawned uWSGI worker 2 (pid: 14135, cores: 1)\r\n    [pid: 14124|app: 0|req: 1/1] 5.148.1.250 () {38 vars in 709 bytes} [Mon Mar 30 17:59:29 2015] GET /v1/crash/ => generated 227 bytes in 61 msecs (HTTP/1.1 500) 3 headers in 113 bytes (1 switches on core 0)\r\n    [pid: 14135|app: 0|req: 1/2] 5.148.1.250 () {40 vars in 740 bytes} [Mon Mar 30 17:59:40 2015] GET /v1/crash/ => generated 227 bytes in 51 msecs (HTTP/1.1 500) 3 headers in 113 bytes (1 switches on core 0)\r\n    [pid: 14124|app: 0|req: 2/3] 5.148.1.250 () {40 vars in 740 bytes} [Mon Mar 30 17:59:49 2015] GET /v1/crash/ => generated 227 bytes in 11 msecs (HTTP/1.1 500) 3 headers in 113 bytes (1 switches on core 0)\r\n    [pid: 14135|app: 0|req: 2/4] 5.148.1.250 () {38 vars in 710 bytes} [Mon Mar 30 18:04:07 2015] GET /v1/crash/ => generated 227 bytes in 13 msecs (HTTP/1.1 500) 3 headers in 113 bytes (1 switches on core 0)\r\n    [pid: 14124|app: 0|req: 3/5] 5.148.1.250 () {38 vars in 710 bytes} [Mon Mar 30 18:04:18 2015] GET /v1/crash/ => generated 227 bytes in 19 msecs (HTTP/1.1 500) 3 headers in 113 bytes (1 switches on core 0)\r\nOnly 3 messages are sent to the server (the one being handled by PID 14124).\r\n\r\nWhen terminating uWSGI :\r\n\r\n    Sentry is attempting to send 2 pending error messages\r\n    Waiting up to 10 seconds\r\n    Press Ctrl-C to quit\r\n\r\nOther example :\r\n`uwsgi --http :8080 --module conf.wsgi --home venv --process 3 --threads 2`\r\n\r\nLog :\r\n\r\n    *** Operational MODE: preforking+threaded ***\r\n    WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x15781c0 pid: 14785 (default app)\r\n    *** uWSGI is running in multiple interpreter mode ***\r\n    spawned uWSGI worker 1 (pid: 14785, cores: 2)\r\n    spawned uWSGI worker 2 (pid: 14797, cores: 2)\r\n    spawned uWSGI worker 3 (pid: 14798, cores: 2)\r\n\r\nSame with `--master` (in this case nothing is send), or `--emperor`. Everything spawning processes prevent the messages from being sent. uWSGI v 2.0.10\r\n\r\nThis should be related to PR #583 though this does not fix the issue."},"comment":{"url":"https://api.github.com/repos/getsentry/raven-python/issues/comments/87782011","html_url":"https://github.com/getsentry/raven-python/issues/590#issuecomment-87782011","issue_url":"https://api.github.com/repos/getsentry/raven-python/issues/590","id":87782011,"user":{"login":"xordoquy","id":2340654,"avatar_url":"https://avatars.githubusercontent.com/u/2340654?v=3","gravatar_id":"","url":"https://api.github.com/users/xordoquy","html_url":"https://github.com/xordoquy","followers_url":"https://api.github.com/users/xordoquy/followers","following_url":"https://api.github.com/users/xordoquy/following{/other_user}","gists_url":"https://api.github.com/users/xordoquy/gists{/gist_id}","starred_url":"https://api.github.com/users/xordoquy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xordoquy/subscriptions","organizations_url":"https://api.github.com/users/xordoquy/orgs","repos_url":"https://api.github.com/users/xordoquy/repos","events_url":"https://api.github.com/users/xordoquy/events{/privacy}","received_events_url":"https://api.github.com/users/xordoquy/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T18:31:38Z","updated_at":"2015-03-30T18:31:38Z","body":"uWSGI is a bit different, see http://raven.readthedocs.org/en/latest/config/index.html#a-note-on-uwsgi"}}