Open andrii-korotkov-verkada opened 8 months ago
use the metric?
Which metric is available for this?
I don't think so its directly available in Gunicorn but I think you can use pre_request and post-request hooks and maintain a global counter for number of connection which can be utilized later.
Hello, I hope your day is going well. I'm looking to add some monitoring for services using gunicorn for the number of worker connections. This is to know when the workers are approaching the limit configured using --worker-connections flag and when it needs to be adjusted. I'm curious if there is some function like
get_current_number_of_gunicorn_worker_connections()
I can call in a background thread publishing the metrics? Also if there's a functionis_running_gunicorn_worker()
to skip setups which won't enable gunicorn. Thank you!