-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Pulsar Python client leaks filehandles after destruction if a consumer is created on a partitioned topic #14588
Comments
#14585 partially addresses this (fewer handles are leaked), but doesn't completely address it; leaks still occur. |
The issue had no activity for 30 days, mark with Stale label. |
We observe the same thing with the python client, when we do It looks like an issue with the c++ client, and it is very blocking for us |
The issue had no activity for 30 days, mark with Stale label. |
Closed as stale. The development of the Python client has been permanently moved to http://github.com/apache/pulsar-client-python. Please open an issue there if it's still relevant. |
Describe the bug
In Python, I have to reconnect Client objects a lot. Usually due to bugs.
client.close
andclient.shutdown
are sufficient to disconnect a client object. However, a disconnected client object can't be reconnected, so instead I re-instantiate a brand new Client object to replace it.While doing this, some of my production services started crashing due to file descriptor exhaustion.
It turns out that, if you have called
.subscribe
at least once, closing a consumer object and closing a client do not close all file handles opened on the system. Those handles (a fair number of them--one or two per worker thread per partition, it looks like) leak, consuming resources and putting the process closer to exhaustion.This seems to only happen if:
To Reproduce
Expected behavior
.close
ing aConsumer
object should result in net zero file handle changes on the system..close
ing aProducer
object should result in net zero file handle changes on the system.close
ing aClient
object should result in net zero file handle changes on the system.Code to reproduce
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: