Description
Hey everyone, thanks for taking the time to review this issue, I'm really stuck with how to debug an issue with have with the docker images: 3.10.11-slim and 3.10.12-slim.
Inside the python3.10.11-slim image, I can easily start a thread, for example:
import threading
x = threading.Thread(target=lambda x: print(x), args=(1,))
x.start()
However, when running the same code inside the python 3.10.12-slim image, I get the following error:
import threading
x = threading.Thread(target=lambda x: print(x), args=(1,))
x.start()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/threading.py", line 935, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
Thread availability on the server seem to not be the problem, at least as far as I can tell
cat /proc/sys/kernel/threads-max
31010
Stack overflow says this is how many threads are running
ps -eo nlwp | tail -n +2 | awk '{ num_threads += $1 } END { print num_threads }'
518
It may also be useful to note that this is only happening on one of my servers (ec2 in aws) and does not happen on other servers (same version of ubuntu/docker, and on my local, docker for mac).
Lastly, the version of Docker that's on all the servers are 20.10.7
and the version of ubuntu is 16.04.6
)
Any ideas would be greatly appreciated!