-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service was not ready: transport error #192
Comments
Yes, that's limitation coming from underlying Tonic/Tokio (gRPC) implementation, so you are trying to work with different Tokio runtimes. There was a similar question in the past: #101 if you want to know some details about it. In general I don't recommend to go this path, Firestore instances are clonable and cloning doesn't create multiple connection pool and relatively cheap, so it is better to propagate it and store in structures as a normal field. |
I think that the 2 scenarios are a bit different. The main issue here seems to be related to caching. This issue starts to appear when I use the caching strategy, being it in memory or in temp file. |
I think the root cause still the same. You noticed it with caching because cache.load() uses tokio::spawn() after probably which it detects different tokio runtimes. It is mostly guess depends on my previous digging, firestore crate itself doesn't do anything special except reuses Tonic channels, so this requires a bit digging inside Tonic/Tokio to verify more. |
I'll do some additional verification later around cache if there are anything that can be related from this crate, but I doubt it. |
Thank you so much btw, your help is incredibly appreciated and your work with this lib is awesome. |
I did a bit of digging, and if I test using the
|
Are you running some kind of async tests in your application? Related to a persistence cache error you probably are reusing the same directory for cache and either :
|
Yes to both. |
Then this is the reason. |
I'm closing this for now, let me know if you have additional questions for this. |
In my service I'm trying to define a singleton firebase instance that I will query once I receive some http requests.
Everything seems to be working fine while I run the service normally, but tests break with errors like:
Do you have any suggestion how to overcome this? I tried also to execute them serially but without any luck
The text was updated successfully, but these errors were encountered: