![]() |
Error: can't start new thread - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Error: can't start new thread (/thread-40171.html) |
Error: can't start new thread - maha2 - Jun-13-2023 Hi! When creating an instance of the pymongo.MongoClient class, I have the following error at irregular intervals: To investigate, I have included a log in threading.py at the appropriate point in the exception handling of the handler 'start':from logging import getLogger logger = getLogger('threading') try: import subprocess total, used, free = map( int, subprocess.check_output(['free', '-t']).splitlines()[-1].split()[1:]) logger.error('### RAM memory used: {} %'.format(str(round((used/total) * 100, 2)))) import threading logger.error('### PYTHON threads: '+str(threading.active_count())) except Exception as err: logger.error('### RAM memory error '+str(err))In the logs I have the following result: RAM memory error [Errno 11] Resource temporarily unavailable Can the log output be interpreted unambiguously? a) When calling subprecess.check_output(), it is simply no longer possible to create new threads due to the thread problem or b) the RAM limit has been reached or c) ? Thank you very much! |