Closed Bug 729103 Opened 12 years ago Closed 12 years ago

handle timeout error for elasticsearch in aaq

Categories

(support.mozilla.org :: Search, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED
2012-03-06

People

(Reporter: willkg, Assigned: willkg)

References

Details

(Whiteboard: u=dev c=search s=2012.5 p=1)

Looks like AAQ is throwing ISE when it times out with ES:


Traceback (most recent call last):

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django-mobility/mobility/decorators.py", line 23, in wrapper
    return f(request, *args, **kw)

  File "/data/www/support.mozilla.org/kitsune/vendor/src/django-session-csrf/session_csrf/__init__.py", line 127, in wrapper
    response = f(request, *args, **kw)

  File "/data/www/support.mozilla.org/kitsune/apps/questions/views.py", line 206, in new_question
    product.get('tags'))

  File "/data/www/support.mozilla.org/kitsune/apps/questions/views.py", line 960, in _search_suggestions
    for r in raw_results:

  File "/data/www/support.mozilla.org/kitsune/vendor/src/elasticutils/elasticutils/__init__.py", line 532, in __iter__
    return iter(self._do_search())

  File "/data/www/support.mozilla.org/kitsune/vendor/src/elasticutils/elasticutils/__init__.py", line 502, in _do_search
    hits = self.raw()

  File "/data/www/support.mozilla.org/kitsune/vendor/src/elasticutils/elasticutils/__init__.py", line 522, in raw
    hits = es.search(qs, index, self.type._meta.db_table)

  File "/data/www/support.mozilla.org/kitsune/vendor/packages/pyes/pyes/es.py", line 841, in search
    return self._query_call("_search", body, indexes, doc_types, **query_params)

  File "/data/www/support.mozilla.org/kitsune/vendor/packages/pyes/pyes/es.py", line 251, in _query_call
    response = self._send_request('GET', path, body, querystring_args)

  File "/data/www/support.mozilla.org/kitsune/vendor/packages/pyes/pyes/es.py", line 208, in _send_request
    response = self.connection.execute(request)

  File "/data/www/support.mozilla.org/kitsune/vendor/packages/pyes/pyes/connection_http.py", line 167, in _client_call
    return getattr(conn.client, attr)(*args, **kwargs)

  File "/data/www/support.mozilla.org/kitsune/vendor/packages/pyes/pyes/connection_http.py", line 59, in execute
    response = self.client.urlopen(Method._VALUES_TO_NAMES[request.method], uri, body=request.body, headers=request.headers)

  File "/data/www/support.mozilla.org/kitsune/vendor/packages/pyes/pyes/urllib3/connectionpool.py", line 286, in urlopen
    raise TimeoutError("Request timed out after %f seconds" % self.timeout)

TimeoutError: Request timed out after 5.000000 seconds


It's probably the case that we changed the code for searches, but didn't also change the code for AAQ.

Probably need to make sure the two do the same thing in regards to errors.
Tossing this in the 2012.5 sprint as a 1 pointer. It should be a pretty quick bug and it makes sure that SUMO handles timeouterrors from ES in AAQ rather than throw up an ISE.
Whiteboard: u=dev c=search s=2012.5 p=1
This should block bug #729688.
Blocks: 729688
Making this a P1 for the next sprint.
Priority: -- → P1
Grabbing these.
Assignee: nobody → willkg
In master: https://github.com/mozilla/kitsune/commit/f788c7721dc782cd49282deaf0dbca65aa2c14c8

To test this, we need to shut down ES. Given that, I think I'm going to mark it as [qa-].
Assignee: willkg → rrosario
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2012-03-06
wasn't me :-P
Assignee: rrosario → willkg
I think I was testing bugzilla name auto-complete on this bug. :p
Closed as [qa-]
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.