-
Notifications
You must be signed in to change notification settings - Fork 10
Description
I know this is a very vague error report and it can’t be reproduced, but I want to share our observations in case someone has seen something similar in their projects
Background
We are running a google cloud deployed service handling a burst of data from pubsubs every four hours. Messages are fetched with a loop like this:
loop {
let subscription = subscriber.stream_subscription(transaction_subscription_name.clone(),pubsub::StreamSubscriptionConfig::default());
while let Some(event) = subscription.next().await {
// Handle messages here.
}
// Log print Stream terminated and needs to be restarted
}
During normal operation we get a recoverable error every 30-50 minutes:
"Status { code: Unavailable, message: \"The service was unable to fulfill your request. Please try again. [code=8a75]\", metadata: MetadataMap { headers: {\"subscription\": \"chain-transactions-prod\"} }, source: None }"
This error is cough by the outer loop which restarts the subscription.
The issue, messages piling up not delivered
Last weekend we observed an outage, where we had messages piling up in our pubsub without being handled. The service was manually restarted four times, checking the logs from the incident I noticed, During the entire outage from 2023-06-30 07:12:40.865 UTC
to 2023-07-01 11:40:57.218 UTC
, not a single code=8a75
occurred, and still no messaged were consumed by our loop.
After the restarts messages were immediately handled but then again after some time it got silently disconnected again.
One theory is ya-gcp got disconnected from the pubsub service but was not able to notify the consumer by terminating the iterator.
The questions are:
- Is there a possible execution path in the lower layers of the code in ya-gcp where this could occur unpropagated?
- Should we use the API in a different way?
We have not been able to reproduce the problem, the same code had been running without issues for several months and no issues observed in the last few days