Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/relations: GreenletExit for requests with many corpora #10

Open
janiemi opened this issue Mar 10, 2022 · 0 comments
Open

/relations: GreenletExit for requests with many corpora #10

janiemi opened this issue Mar 10, 2022 · 0 comments

Comments

@janiemi
Copy link

janiemi commented Mar 10, 2022

Some /relations requests on many corpora sometimes terminate in a GreenletExit error after processing some of the corpora. For example, this search first terminated after processing 6 of the 20 corpora in 41 seconds, then after 8 corpora in 152 seconds, then after 9 corpora in 74 seconds. The error with traceback was the following (pretty-printed here):

"ERROR": {
  "type": "GreenletExit",
  "value": "",
  "traceback": [
    "Traceback (most recent call last):",
    "  File \"/home/fkkorp/korp-backend/v8/korp.py\", line 146, in incremental_json",
    "    for response in ff:",
    "  File \"/home/fkkorp/korp-backend/v8/korp.py\", line 232, in decorated",
    "    msg = q.get(block=True, timeout=timeout)",
    "  File \"/home/fkkorp/korp-backend/v8/venv/lib64/python3.6/site-packages/gevent/queue.py\", line 283, in get",
    "    return self.__get_or_peek(self._get, block, timeout)",
    "  File \"/home/fkkorp/korp-backend/v8/venv/lib64/python3.6/site-packages/gevent/queue.py\", line 260, in __get_or_peek",
    "    result = waiter.get()",
    "  File \"/home/fkkorp/korp-backend/v8/venv/lib64/python3.6/site-packages/gevent/hub.py\", line 898, in get",
    "    return self.hub.switch()",
    "  File \"/home/fkkorp/korp-backend/v8/venv/lib64/python3.6/site-packages/gevent/hub.py\", line 630, in switch",
    "    return RawGreenlet.switch(self)",
    "greenlet.GreenletExit"
  ]
}

Does the GreenletExit result from a timeout of some kind? Could that perhaps be avoided, or could the error message be somehow more informative? However, sometimes a similar search succeeds even if it takes much longer time, so what causes a GreenletExit? Does the server load perhaps have an effect?

At least in the above case, it seemed that successive searches always got a bit further in the list of corpora before a GreenletExit. Is that effect due to caching the result by corpus?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant