speech 0.32.0 causing memory leak
See original GitHub issue-
Specify the API google-cloud-speech 0.32.0
-
OS type and version Ubuntu and CentOS
-
Python version 2.7.3
-
Step to reproduce I have a chatbot program where it let user speaks to the computer and computer will response back. The program will call speech to text module from time to time. I notice that after few minutes, the program crash with
OSError: [Errno 12] Cannot allocate memory
. I ran the program again along sidetop
command and I notice that the memory usage is gradually increasing. After several debugging process, I found out that the problem came from thegoogle-cloud-speech
usage. I downgrade the library to the one that I used before (0.29.0) and run the program again. I notice that this time, the memory usage is not that high and it didn’t increase over time.
top output when I’m running the program with google-cloud-speech 0.32.0
top output when I’m running the program with google-cloud-speech 0.29.0
Here’s the code that I used for this test. memory_leak_test.txt
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
@crwilcox I have yet to updated my
grpcio
but updatinggoogle-cloud-speech
to 0.33.0 seems to fix the issue as well@akmalhakimi1991, this should be resolved as we believe the root of the issue was fixed in a recent update to grpcio. If you update grpcio by running
pip install grpcio --upgrade
your issue should be resolved. This will get version 1.11.0 which has the fix.