Skip to content

When something fails

What happens, and what you see, when the database, the e-mail provider, a key, a provider or the engine itself fails.

Applies to EngineCloud
View as Markdown
On this page
  1. No queues, no dead letters
  2. What is alerted

The engine keeps no state of its own and does every change in one transaction. So most failures end in a clean «try again», never in half-written data.

What failsWhat happensWhat callers seeWhat you do
The database is unreachableNothing is written. Already-issued access tokens keep working for the Data API only if the database is back; their own validity does not depend on it503 database_unavailable with Retry-AfterRestore the database; nothing to clean up
All connections are busyThe request waits up to 2 seconds for one503 pool_exhausted after 2 sRaise the pool or the database size (Scaling)
The e-mail provider is downThe one-time token is kept; the e-mail is retried 3 times over 10 minutes from a row in Postgres202 with email_queued_retry; the person can ask againFix the provider; the console shows a warning and the audit log has email_failed
An address bounces or complainsThe address is suppressed for auth e-mailsLater e-mails to it are skippedThe person updates their address
Google or GitHub is downProvider sign-in cannot finishprovider_unavailable on the callbackOther sign-in methods still work
A signing key is rotatedThe new key is published before it signs; the old one stays published until its tokens expireNothingNothing
KMS is unavailableInstances already running keep their decrypted data key in memory and keep working; a new instance cannot start signing503 keys_unavailable from cold instances onlyWait for KMS; nothing is lost
The engine crashes or is replacedIt keeps nothing between requests; the next instance servesAt most the in-flight request failsNothing
A refresh token is used twiceReuse after the window revokes the sessioninvalid_grant (refresh_token_reused)The person signs in again
Too many requestsRate limits or the function’s concurrency limit429 or 503 with Retry-AfterRaise limits, or find the client misbehaving in the audit log

No queues, no dead letters

The engine has no message queues, so there are no dead-letter queues to watch. The only background work — retrying e-mails and deleting expired one-time tokens, assertion ids and old audit rows — is driven by rows in Postgres and run by the engine on a schedule (every minute in Sypnia Cloud, from EventBridge; sypnia-data tick when self-hosted).

What is alerted

In the AWS template, CloudWatch alarms fire on: function errors above 1 % for 5 minutes, throttles, database connections above 80 % of the limit, and e-mail failures above 5 in 10 minutes.

  1. No queues, no dead letters
  2. What is alerted

    Search pages, sections and terms