File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/pyramid_exclog/__init__.py", line 111, in exclog_tween
return handler(request)
File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/pyramid_tm/__init__.py", line 101, in tm_tween
reraise(*exc_info)
File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/pyramid_tm/__init__.py", line 83, in tm_tween
response = handler(request)
File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/pyramid/router.py", line 145, in handle_request
view_name
File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/pyramid/view.py", line 541, in _call_view
response = view_callable(context, request)
File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/pyramid/config/views.py", line 328, in attr_view
return view(context, request)
File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/pyramid/config/views.py", line 304, in predicate_wrapper
return view(context, request)
File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/pyramid/config/views.py", line 244, in _secured_view
return view(context, request)
File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/pyramid/config/views.py", line 385, in viewresult_to_response
result = view(context, request)
File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/pyramid/config/views.py", line 507, in _requestonly_view
response = view(request)
File "/opt/reviewqueue/reviewqueue/views/reviews.py", line 215, in create
result = validate(source_url, request.user, request.registry.settings)
File "/opt/reviewqueue/reviewqueue/views/reviews.py", line 130, in validate
user.get_groups(settings) and
File "/opt/reviewqueue/reviewqueue/models/other.py", line 329, in get_groups
groups = [t.name for t in (lp_user.super_teams or [])]
File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/lazr/restfulclient/resource.py", line 804, in __iter__
unicode(self._root._browser.get(URI(next_link))))
File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/lazr/restfulclient/_browser.py", line 411, in get
response, content = self._request(url, extra_headers=headers)
File "/opt/reviewqueue/.venv/local/lib/python2.7/site-packages/lazr/restfulclient/_browser.py", line 401, in _request
raise error
ServerError: HTTP Error 503: Service Unavailable
Response headers:
---
-content-encoding: gzip
connection: close
content-length: 9833
content-type: text/html;charset=utf-8
date: Tue, 30 May 2017 14:46:39 GMT
retry-after: 900
server: zope.server.http (HTTP)
status: 503
vary: Accept-Encoding
x-lazr-oopsid: OOPS-7a2f94be2b03d50439344b2c3cc5c07d
x-powered-by: Zope (www.zope.org), Python (www.python.org)
This can happen on POST https://review.jujucharms.com/reviews/create if the user has enough team memberships to make the LP query timeout. wgrant on the lp team suggested making the api request as on anon user, which would exclude the user's private teams and therefore make the request faster. At the very least we should catch the error and allow the request to continue as if the user had no teams.
This can happen on POST https://review.jujucharms.com/reviews/create if the user has enough team memberships to make the LP query timeout. wgrant on the lp team suggested making the api request as on anon user, which would exclude the user's private teams and therefore make the request faster. At the very least we should catch the error and allow the request to continue as if the user had no teams.