Closed andrew-nowak closed 1 year ago
Sometimes Elasticsearch is unavailable, and queries fail with 502. Akka streams by default exit on failures, which is reasonable. We can wrap the source in a RestartSource https://doc.akka.io/docs/akka/current/stream/operators/RestartSource/onFailuresWithBackoff.html to restart when the stream exits with failure.
(We could consider doing the same for the Thrall stream, but that seems more resilient to these transient errors, and is monitored by the healthcheck endpoint, causing a redeploy if down. Regardless, for more consideration and a future change)
Seen on usage, image-loader, metadata-editor, thrall, leases, cropper, collections, media-api, kahuna (merged by @andrew-nowak 10 minutes and 53 seconds ago) Please check your changes!
Seen on auth (merged by @andrew-nowak 11 minutes ago) Please check your changes!
What does this change?
Sometimes Elasticsearch is unavailable, and queries fail with 502. Akka streams by default exit on failures, which is reasonable. We can wrap the source in a RestartSource https://doc.akka.io/docs/akka/current/stream/operators/RestartSource/onFailuresWithBackoff.html to restart when the stream exits with failure.
(We could consider doing the same for the Thrall stream, but that seems more resilient to these transient errors, and is monitored by the healthcheck endpoint, causing a redeploy if down. Regardless, for more consideration and a future change)