-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak issue while publishing message #734
Comments
@bowenatbear I do not maintain this library anymore so I can't say for certain, I've been out of the loop for more than 6 months now. The linked issue (#395) has been fixed back then, and I now see that the root cause, bug in CPython, has been fixed as well. However, I see that you use quite dated Python and Pub/Sub versions - any chance of upgrading that? |
@plamut Thanks for the updates. I doubt the same as the Python and Pub/Sub versions we are using is pretty dated. I think we are in the progress upgrading Python version but it might take some time (maybe long). The reason why I am using |
@bowenatbear Are you able to test your code with the new version to verify upgrading will fix you? Unfortunately because the fix was not in our library you would have to upgrade to get the fix. |
@acocuzzo I see. So it seems we have to use a Python version which is later or equal to Python 3.7 to get this fix? |
@bowenatbear yes, exactly. |
The reason why most of the codes are in Python 2.7 now is that we are using ROS1 which is in Py2 and there are lots of dependency issues there. @acocuzzo Thanks and I think then we need to find a way to run this piece of codes separately in > Python 3.7. Will try. |
@bowenatbear Correction, it looks like google-cloud-pubsub=2.4.2 is the first version that has this fix, which requires Python 3.6. I hope that is helpful. |
@acocuzzo I see. Thanks for the updates! |
Issue details
After running the application for a long time, one process keeps taking up more and more memory and finally fail the whole system. It seems the problem comes from the Publishing method using the
pubsub_v1.PublisherClient
. I have seen quite a few tickets about this memory leak issue (E.g. https://bytemeta.vip/repo/googleapis/python-pubsub/issues/395) but could not find how to fix my problem exactly.Environment details
We are using the codes similar to the following codes sample:
The above code piece is a very simple version of my codes, but it contains the main logic. It seems leaving the codes running for a long time, the memory usage will keep increasing. I need some suggestions on how to fix this memory leak problem.
Thanks!
The text was updated successfully, but these errors were encountered: