rjancewicz / python-kadmin

Python module for kerberos admin (kadm5)
MIT License
35 stars 40 forks source link

Disconnecting Sessions #28

Closed ahabers closed 9 years ago

ahabers commented 9 years ago

Hi, is there a current way to disconnect kadmin sessions?

rjancewicz commented 9 years ago

The kadmin object should automatically close the handle to the database and destroy the context pointer upon deallocation. This will happen once the reference count drops to zero for the object or can be invoked explicitly by calling 'del' on the kadmin object. Are you observing different behaviors?

ahabers commented 9 years ago

I am observing different behavior. I've tried deleting the object with del, but the connection persists until the python instance is destroyed.

rjancewicz commented 9 years ago

I have gone through the admin init phases and removed additional reference increment calls. These forced the reference count to never drop below 1 and the memory never collected (thus the handles not properly closed). I have noticed this behavior in the past but only on large deployments where file-descriptors become exhausted. The master branch is up-to-date with the patch please feel free to pull and test; I will be upgrading the PyPy packages shortly (pending another change in the pipeline).

Thank you for your report.

https://github.com/russjancewicz/python-kadmin/pull/29

ahabers commented 9 years ago

Thanks, that certainly solved it.

On Mon, Mar 30, 2015 at 10:52 PM, Russell Jancewicz < notifications@github.com> wrote:

Closed #28 https://github.com/russjancewicz/python-kadmin/issues/28.

— Reply to this email directly or view it on GitHub https://github.com/russjancewicz/python-kadmin/issues/28#event-269128449 .