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
RecursionError: maximum recursion depth exceeded while calling a Python object #1531
Comments
I have seen people are talking about monkey patching order. Not sure where exactly i need to insert that |
You must monkey-patch before importing anything else. gunicorn's default monkey patching is sometimes not enough and you need to do it sooner. Exactly how you do that will depend on your specific deployment scenario (we use a setuptools entry point). There's more discussion at benoitc/gunicorn#1566 Example entry pointAdd a module: # gevent_gunicorn.py
from gevent import monkey; monkey.patch_all()
import sys
from pkg_resources import load_entry_point
def main():
sys.exit(
load_entry_point('gunicorn', 'console_scripts', 'gunicorn')()
)
if __name__ == '__main__':
sys.exit(main()) And add the entry point in setup.py: setup(…
entry_points={
'console_scripts': [
"my_gunicorn=my.package.gevent_gunicorn:main",
],
},
) Then to launch, specify |
Closing since there’s been no response. |
current setup
nginx-gunicorn-flask
Description:
Am trying to run flask-socketIO with gevent and gunicorn
gunicorn -k gevent -c $1 app:app
Gunicorn starts but throws exception:-
......
client_cert=new_config.client_cert)
client_cert=client_cert,
File "/python3.6/site-packages/botocore/httpsession.py", line 180, in init
self._manager = PoolManager(**self._get_pool_manager_kwargs())
File "python3.6/site-packages/botocore/httpsession.py", line 188, in _get_pool_manager_kwargs
'ssl_context': self._get_ssl_context(),
File "/lib/python3.6/site-packages/botocore/httpsession.py", line 197, in _get_ssl_context
return create_urllib3_context()
File "/lib/python3.6/site-packages/botocore/httpsession.py", line 72, in create_urllib3_context
context.options |= options
File "/python3.6/lib/python3.6/ssl.py", line 465, in options
super(SSLContext, SSLContext).options.set(self, value)
File "/python3.6/lib/python3.6/ssl.py", line 465, in options
super(SSLContext, SSLContext).options.set(self, value)
File "/python3.6/lib/python3.6/ssl.py", line 465, in options
super(SSLContext, SSLContext).options.set(self, value)
[Previous line repeated 310 more times]
RecursionError: maximum recursion depth exceeded while calling a Python object
The text was updated successfully, but these errors were encountered: