1. use tornado(not async code) with autoreload enabled - I know motor
2. every time the code is modified, autoreload will run `execv` to replace current process with new process, the old mongo connection will not be released as the FD_CLOEXEC is not set on the socket descriptor, and the new connection will be created.
We use autoreload feature in our stage environment, so the mongo connection will always reach the max after one or two weeks.
This might be a problem...
- is related to
-
PYTHON-1248 ServerSelectionTimeoutError ai_socktype not supported with PyPy and gevent
- Closed