There appear to be 6 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d
Solution 1
I had the same problem as you when doing deep learning and the problem came from that I was loading too much data in memory. Be sure you don't try to load more data in your RAM than it's capacity.
Solution 2
If this problem has occurred in training (deep learning), it's because of ram capacity. Use a smaller value for -batch parameter.
Related videos on Youtube
Vazzattacc
Updated on March 18, 2022Comments
-
Vazzattacc over 2 years
I'm trying a test connection on my Firebase Realtime database via python 3.8. I have two scripts, one is wdata (write data) and the other one is rdata (read data). The wdata.py is:
from firebase import firebase firebase = firebase.FirebaseApplication("https://test-282f7.firebaseio.com/", None) datos={ 'id':'99', 'primer_sensor':'1111', 'segundo_sensor':'512' } resultado=firebase.post('/tutorial_firebase/datos_post', datos) read = firebase.get('/tutorial_firebase/datos_post', datos)
This script returns the same error but it inserts "datos" values in firebase.
The rdata.py is:
from firebase import firebase firebase = firebase.FirebaseApplication("https://test- 282f7.firebaseio.com/", None) lectura = firebase.get('/tutorial_firebase/datos_post', datos_post) print (lectura)
And this code also returns an error. The error is:
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 6 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d '
Please can anyone tell me where is the error and how can I fix it?
p.s.:
My python compiler is: Python 3.8.2. (with 3.7 I install firebase but it returns "ModuleNotFoundError") I'm on macOS Catalina 10.15.7 Tried to compile in VS Code and MacVIM but the result is the same.
Thank you advance!
-
Genarito about 2 yearsThis issue seems to be reported on the official Python bugs site: link
-
-
TripleAntigen over 3 yearsThanks, I just reduced the batch size and tried again, and it worked.
-
slhck over 2 yearsIn my case, this was caused by using
multiprocessing.Queue
without a reasonable maximum size. Too much data was being put into the queue at once. Instantiate it withmultiprocessing.Queue(1000)
or however many items you want in there.