django-health-check icon indicating copy to clipboard operation
django-health-check copied to clipboard

Only close DB connections when using threading

Open RealOrangeOne opened this issue 1 year ago • 4 comments

Previously, connections would be closed when threading was disabled. If opening a connection isn't a cheap operation, this adds latency to both the healthcheck request and future requests processed by the worker.

RealOrangeOne avatar Oct 11 '24 13:10 RealOrangeOne

Talking with Frank about this, will circle back.

seanpar203 avatar Feb 10 '25 15:02 seanpar203

Support for this was just merged into master.

seanpar203 avatar Jun 10 '25 22:06 seanpar203

@seanpar203 I'm not sure that's true - looking at the code in master it still tries to close connections even when unthreaded?

RealOrangeOne avatar Jun 11 '25 08:06 RealOrangeOne

@RealOrangeOne Sorry, I meant to put that in your other ticket about multiple DB support.

seanpar203 avatar Jun 11 '25 09:06 seanpar203