Open richard-yao opened 1 month ago
Hi @richard-yao, I can replicate this bug and your analysis is correct! The addition of -k gevent
causes the behaviour. The problem seems to be with the batch.flush()
method that is called upon exiting the batch context leading to some kind of deadlock between the asyncio
event loop used by the client and gevent
's implementation. I will look into it and see if there's a fix that can be made!
Edit: I've tested the bug on the implement-async-client branch, where the management of the client's internal event loop is much improved, and it doesn't exist! Once that implementation lands in the next minor release this bug should be gone!
@tsmith023 Thanks for your answer! I have using another api: collection.data.insert_many
, this works normal for me, and I'm very glad to hear that you guys had fixed this problem, I'm really looking forward to the next release
Hey all, I have met a strange issue: I have a flask app to manage request and store data to weaviate db When I debug with Pycharm, all works well, but if I start server with gunicorn, the same request with same code stuck!
My server dependencies here:
And my python version is:
Python 3.11.6
The issue code:
When I debug with PyCharm, it work well, the logs is:
And when I start gunicorn server, the same request stuck with log:
My gunicorn server command is:
And I also tried to upgrade weaviate-client to 4.6.0 but it is not work too.
This issue looks like the
with collection.batch.dynamic() as batch:
not complete because my data not stored into weaviate db, and I suspect this issue caused ofgevent
, the only difference between PyCharm debug and gunicorn server