-
Notifications
You must be signed in to change notification settings - Fork 22
The datastore operation timed out, or the data was temporarily unavailable #35
Comments
@teebu, I haven't seen the stream API for firestore queries before, so that's a cool find. Unfortunately, it looks like it is just for one-off queries to firestore, not for listeners. Elasticstore requires maintaining listeners for added/removed/modified. It looks like that has been updated upstream in |
So you're saying the What about the solution provided in the ticket, googleapis/nodejs-firestore#1040 (comment)? |
No, it doesn't have that functionality - or at least, doesn't have that functionality right now. Nor, unfortunately will the solution he proposes work for our purposes.
Now, an alternative might be to That said, doing an |
Some ideas from https://stackoverflow.com/questions/33885059/how-to-only-get-new-data-without-existing-data-from-a-firebase One proposal is to have a |
Same problem here 😥 |
I contacted firebase support, their response:
|
Well. Given that from support - any suggestions on how to make this work? We could restart the listener in the event that it fails - but that would pull all the initial documents again. Which, in my mind, would have a lot of unnecessary reads. The Frankly, I don't have a project that I'm able to see this error on. My example project https://elasticstore.netlify.app has long running listeners and has not had this problem. Is there any way y'all can provide a project I can use to debug with? (Also, thanks for keeping us in the loop @teebu!) |
Restarting the listener is a bad idea. I ran into an issue where I had this running on a kubernetes pod, and it ran out of memory relatively quickly because of how much data it was pulling, ended up restarting like 200 times in a couple of days, ended up costing like $100 bucks in firebase fees. I don't have any good solutions. The idea would be sync using stream and pagination, and on a separate process do the snap from now onwards. |
Ooof. Sorry to hear it. I'll keep mulling on it then. Thanks @teebu |
Thanks for the feedback guys. Is it too big/heavy? @acupofjose if you wish I can give you access to my Firestore database |
Any update for this problem? |
Can this be solved in the following way? Firestore reactive pagination |
@timtim001hk - sorry for the delay, I've been out of the country. That's an interesting solution! I think it would require counting the number of records in the listener so that you can maintain the cursors. There is also a question of how big the listener blocks should be - 10,000 records? 50,000? Curious as to your thoughts on those! |
I think 10,000 records is reasonable. It would be better to become configurable. Waiting for your good news! |
I'm seeing this error, not sure why, but it should just keep retrying, at least a few times, instead of ending the process.
I'm not too familiar with firestore, but it seems to me that you are downloading instead of streaming the collection. And if its too big, it will time out?
Is this the solution? https://cloud.google.com/nodejs/docs/reference/firestore/1.3.x/Query#stream
Here is the issue that they claim fixed this:
googleapis/nodejs-firestore#1040
The text was updated successfully, but these errors were encountered: