You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several issues have previously been caused due to eventlet worker which changes blocking I/O to non-blocking by monkey patching (see fossasia/open-event-frontend#4544), greatly increasing the concurrency of the server. To fix the bugs, we previously disabled eventlet worker as a workaround. But the performance of the server decreased so we re-enabled it after verifying that previous issues aren't happening.
File "/home/iamareebjamal/.pyenv/versions/3.7.7/lib/python3.7/ssl.py", line 518, in options
super(SSLContext, SSLContext).options.__set__(self, value)
[Previous line repeated 468 more times]
RecursionError: maximum recursion depth exceeded while calling a Python object
After debugging, we found out that gunicorn preload mode is incompatible with async workers which require money patching before any code is run. This is because preload option runs the application code first and then forks it into multiple processes. This saves memory but obviously prevents monkey patching from happening earliest in the bootstrapping process. So, we need to configure the server so that preload flag is configurable and after benchmarking, we'll conclude whether to remove preload and allow eventlet for speed at the cost of memory or remove eventlet and allow preload for memory at the cost of speed. For now, we'll just remove eventlet worker as a workaround, yet again
The text was updated successfully, but these errors were encountered:
Several issues have previously been caused due to eventlet worker which changes blocking I/O to non-blocking by monkey patching (see fossasia/open-event-frontend#4544), greatly increasing the concurrency of the server. To fix the bugs, we previously disabled eventlet worker as a workaround. But the performance of the server decreased so we re-enabled it after verifying that previous issues aren't happening.
The core cause of the issues is recursion error: eventlet/eventlet#371
After debugging, we found out that gunicorn preload mode is incompatible with async workers which require money patching before any code is run. This is because preload option runs the application code first and then forks it into multiple processes. This saves memory but obviously prevents monkey patching from happening earliest in the bootstrapping process. So, we need to configure the server so that preload flag is configurable and after benchmarking, we'll conclude whether to remove preload and allow eventlet for speed at the cost of memory or remove eventlet and allow preload for memory at the cost of speed. For now, we'll just remove eventlet worker as a workaround, yet again
The text was updated successfully, but these errors were encountered: