aerospike / aerospike-client-python

Aerospike Python Client
Apache License 2.0
132 stars 110 forks source link

Losing connection to aerospike cluster with new gunicorn #616

Open klemby opened 3 months ago

klemby commented 3 months ago

Hi Im having difficulties after updating gunicorn to version 22.0.0 which has breaking changes mentioned in changelog.

bins = self.client.get(key)[BINS_INDEX] ^^^^^^^^^^^^^^^^^^^^ exception.ClusterError: (11, 'No connection to aerospike cluster', 'src/main/client/get.c', 73, False)

When gunicorn freezed to version 21.2.0 problem disappears. I didnt find anything in aerospike logs.

juliannguyen4 commented 3 months ago

Hey @klemby, this may not be an Aerospike-specific issue. Could you try adjusting your connection settings in gunicorn? I would need more details to debug this issue

klemby commented 3 months ago

This is my gunicorn config:

bind = '0.0.0.0:5100'
workers = 4

timeout = 90
accesslog = '-'  # sys.stdout - see http://docs.gunicorn.org/en/stable/settings.html#accesslog
errorlog = '-'
loglevel = 'info'
post_fork = 'matej.workers.gunicorn_worker.post_fork'
worker_exit = 'matej.workers.gunicorn_worker.worker_exit'

Well there is also kafka, sqlite, mongo but Im having difficulties only with aerospike cluster connection. Sure this might not be aerospike problem but I was wondering if you do not have similar experience after gunicorn update.

juliannguyen4 commented 3 months ago

Hi @klemby, can you share the Aerospike client config that you're using? I need to know which features of the Python client aren't working properly