Fix hangs when loading issues
Before we merged the code which upgraded the instance to Python 3 we had
hangs when loading issues because the instance would be teared down due
to reaching the memory limit. After this upgrade, we saw these hangs
more consistently (the app wouldn't list issues in the first request but
it would in the second one) and we saw 500 errors very rarely.
We tried to fix the memory limit error by decreasing the limit of
objects which can be cached in memory. However, that did not fix the
issue.
As tested locally, I saw that when configuring 1 worker, the app
wouldn't load issues, but by configuring 2 workers, it would (maybe when
it is servicing one request it cannot service another the internal one
made to the search endpoints?). Thus, this is a temptative fix for this
issue.
GitOrigin-RevId: 16cccd88263ba494f9f3093b83fbcac2bfe8ed58
diff --git a/app.yaml b/app.yaml
index 56c9847..ba3b2e4 100644
--- a/app.yaml
+++ b/app.yaml
@@ -5,7 +5,7 @@
runtime: python39
app_engine_apis: true
-entrypoint: gunicorn -b :$PORT --timeout 60 --workers 1 --threads 1 main:app
+entrypoint: gunicorn -b :$PORT --timeout 60 --workers 2 --threads 1 main:app
default_expiration: "10d"