【发布时间】:2018-07-17 10:39:11
【问题描述】:
我经常从 Firestore 中得到这个运行时异常。下面我附上了堆栈跟踪。我正在使用:
com.google.firebase:firebase-firestore:17.0.1
Caused by io.grpc.StatusException: DEADLINE_EXCEEDED: The datastore operation timed out, or the data was temporarily unavailable.
at io.grpc.Status.asException(SourceFile:534)
at com.google.firebase.firestore.g.zzs.zza(SourceFile:98)
at com.google.firebase.firestore.b.zzd.zza(SourceFile:122)
at com.google.firebase.firestore.b.zzab.zza(SourceFile:321)
at com.google.firebase.firestore.b.zzf.zza(SourceFile:236)
at com.google.firebase.firestore.f.zzo.zza(SourceFile:6527)
at com.google.firebase.firestore.f.zzv.zzb(SourceFile:2089)
at com.google.firebase.firestore.f.zza$zzb.zza(SourceFile:73)
at com.google.firebase.firestore.g.zzm$1.onMessage(SourceFile:77)
at io.grpc.ForwardingClientCallListener.onMessage(SourceFile:36)
at io.grpc.ForwardingClientCallListener.onMessage(SourceFile:36)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(SourceFile:498)
at io.grpc.internal.ContextRunnable.run(SourceFile:37)
at io.grpc.internal.SerializingExecutor.run(SourceFile:123)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at com.google.firebase.firestore.g.zza$zza.run(SourceFile:190) at java.lang.Thread.run(Thread.java:818)
我不确定,但我认为当我在 firestore 的 onComplete 回调中调用 task.getResult() 时会收到此异常。 Collection() 方法。
【问题讨论】:
-
您要运行什么操作? cloud.google.com/appengine/articles/…
-
我在 firestore.Collection() 方法的 onComplete 回调中调用 task.getResult()
-
您是否超出使用限制? firebase.google.com/docs/firestore/quotas你可能想重新考虑你的收藏规模
-
我认为我们没有超过我们的写入/秒或并发连接数。文档的大小也小于 5kb
标签: java android firebase google-cloud-firestore