Handling Timeouts During Collection Deletion

TLDR Narayan wondered why deleting collections with many documents often times out. Kishore Nallan suggested increasing the client's connection parameters and reassured that a timed-out operation still successfully deletes the collection server-side.

Photo of Narayan
Wed, 27 Sep 2023 07:02:18 UTC

Sometimes deleting a collection times out, especially when it has a lot of documents. Is that delete a synchronous call that waits till all the objects are cleared? if yes, does it need to be? Anything else I can do instead of increasing the timeouts on the client?

Photo of Kishore Nallan
Kishore Nallan
Wed, 27 Sep 2023 07:03:25 UTC

Yeah increase the connection timeout parameter used when creating the client. Maybe use a different client for long running ops like deletion. But for deletion even if call times out, the operation will succeed in the server.

Photo of Narayan
Wed, 27 Sep 2023 07:05:30 UTC

Understood, thanks. Yes, that has been my experience - even if the operation times out on the client if I query the collection I get a 404 so I assume that the collection was deleted successfully. I’ll just increase the timeout for these operations.