Re: [python] [flask] [CQLAlchemy] NoHostAvailable on create

2017-12-31 Thread Alan Hamlett
Thanks for the reply, I think it's related. However, after using a fork of Flask-CQLAlchemy with postfork I'm still getting the NoHostAvailable error once per 4k requests. One strange thing is the error rate doesn't increase with the number of requests, since some uWSGI clients with ~20k requests o

Re: [python] [flask] [CQLAlchemy] NoHostAvailable on create

2017-12-31 Thread Jeff Jirsa
uWSGI forks and the driver / cqlalchemy may need to reconnect or otherwise fix the state after each fork - you could try to prove this is the cause by checking uWSGI logs or ps for indication that a worker process has exited/been recycled. If you think it may be related to this, check out @postf

Re: [python] [flask] [CQLAlchemy] NoHostAvailable on create

2017-12-31 Thread Alan Hamlett
More info: The NoHostAvailable error is happening at random times on each client host, so it's probably a client error. If the Cassandra cluster was really offline then all client hosts would report the error at the same time instead of different random times. The NoHostAvailable error occurs about

[python] [flask] [CQLAlchemy] NoHostAvailable on create

2017-12-31 Thread Alan Hamlett
I'm seeing tracebacks in my Python Flask app when creating rows: Traceback (most recent call last): File "/opt/app/current/app/api.py", line 1174, in consume_heartbeat Heartbeat.create(**form_data) File "/opt/app/current/venv/lib/python3.4/site-packages/cassandra/cqlengine/models.py", lin