question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need help for Setting timeout in Firestore

See original GitHub issue

I’m look for setting a timeout in case of cable connected but unable to access internet. as I see in this document. https://jskeet.github.io/google-cloud-dotnet/docs/Google.Cloud.Firestore.Data/api/Google.Cloud.Firestore.V1Beta1.FirestoreSettings.html Default timeout was 10 mins. and I try but I can’t change the setting (get only, I can’t set).

this is what I try for now but I don’t know how to set that. Could you please show me an example of how to? `FirestoreSettings fs = new FirestoreSettings();

var t = fs.WriteSettings.Timing.Expiration.Timeout;`

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
jskeetcommented, Sep 4, 2018

Just pass it into the FirestoreDb.Create method as normal:

var db = FirestoreDb.Create("my project ID", client: client);

or

var db = FirestoreDb.Create(projectId: "my project ID", client: client);
1reaction
jskeetcommented, Sep 3, 2018

Configuring timings can be tricky, I agree - there are lots of different options to consider, including the basic “do you want an expiration or a retry”. Here’s an example that uses a flat 10 second timeout:

var settings = FirestoreSettings.GetDefault();
var timing = CallTiming.FromTimeout(TimeSpan.FromSeconds(10));

// CallSettings itself is immutable, but there are many "with" methods
// that create a new instance based on an existing one, but with the
// given modification.
settings.WriteSettings = settings.WriteSettings.WithCallTiming(timing);

// Once we've got the settings, we can create a client
var client = FirestoreClient.Create(settings: settings);

// Once we've got the client, we can create a FirestoreDb
var db = FirestoreDb.Create(client: client);

Does that help?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timeout for firestore operations - firebase
There are no configurable timeouts for Firestore reads and writes. The Firestore SDK will automatically retry database operations with the ...
Read more >
Firestore/Datastore requests terminate within 60 seconds ...
The Firestore API enforces a 60-second request timeout on incoming requests, which causes requests to terminate after 60 seconds on Firestore's remote server ......
Read more >
Best practices for Cloud Firestore - Firebase
Use the best practices listed here as a quick reference when building an application that uses Cloud Firestore. Database location.
Read more >
Encountered unexpected query timeout
@firebase/firestore: Firestore (8.4.0): Connection GRPC stream error. Code: 1 Message: 1 CANCELLED: Disconnecting idle stream. Timed out waiting ...
Read more >
Firebase Emulators Error: TIMEOUT: Port 8080 on localhost ...
This timeout issue happens when you try to run Firebase emulators locally. Assuming you've run firebase init and installed the emulators as soon...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found