Something ain't thread safe: OAuthError: No access to private resources at "". #85

jpic opened this Issue May 26, 2011 · 0 comments


None yet
1 participant

jpic commented May 26, 2011

Hi all,

After some time, i receive the following trackback. I can't use twitter login anymore then. I restart the server and everything works again.

In my case I "think" I "fixed" it by reducing the threads max-requests from 5000 to 35 in uWSGI. But there is definitively more to dig.

For starters: anyone else experiences this issue ? It looks like an error from my code, which hasn't anything appearing non-thread safe... so I'm stuck on that.

Traceback (most recent call last):

 File "/srv/", line 100, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/srv/", line 176, in twitter
   user_info = client.get_user_info()

 File "/srv/", line 330, in get_user_info
   user = simplejson.loads(self.query(self.url))

 File "/srv/", line 319, in query
   _('No access to private resources at "%s".') % get_token_prefix(self.request_token_url))

OAuthError: No access to private resources at "".

GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:{'__utma': '178145764[snip]1.40',
 '__utmb': '17[snip]1',
 '__utmc': '178145764',
 '__utmz': '17814576[snip].utmcsr=google|utmccn=(organic)|utmcmd=organic|',
 'csrftoken': '[snip]',
 'sessionid': '[snip]'},
 'CSRF_COOKIE': '[snip]',
 'DOCUMENT_ROOT': '/usr/local/nginx/html',
 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_HOST': '',
 'HTTP_KEEP_ALIVE': '115',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1',
 'PATH_INFO': u'/socialregistration/twitter/',
 'REMOTE_PORT': '38682',
 'REQUEST_URI': '/socialregistration/twitter/',
 'SCRIPT_NAME': u'',
 'SERVER_PORT': '80',
 'uwsgi.version': '',
 'wsgi.errors': <open file 'wsgi_input', mode 'w' at 0x23650c0>,
 'wsgi.file_wrapper': <built-in function uwsgi_sendfile>,
 'wsgi.input': <open file 'wsgi_input', mode 'r' at 0x2365f60>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}>

@jpic jpic closed this Feb 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment