Docs / EventSourcingDB / Errors / backup-unreadable

backup-unreadable

Reading the backup broke off, for example because the client dropped the connection.

  • Route: restore-backup
  • Description: backup is unreadable: the request could not be read to its end
  • Details: None; details is an empty object.

Why It Happens#

A restore reads the backup while the client sends it, without a limit on its size. Here, reading the request body failed before it ended: the connection dropped, or the client sent nothing for more than five seconds, the limit that a restore sets for each read rather than for the whole body. So the transfer failed, not necessarily the backup. The log of the server names the cause.

How to Fix It#

Send the backup again, without long pauses. EventSourcingDB has removed what it restored so far, so the database is empty again. Since the transfer failed rather than the backup, sending the same request again can succeed.

Example#

For a restore whose client stops sending the backup for more than five seconds, EventSourcingDB answers with this error, as a line of the stream, and then ends the stream with its end item:

{
  "type": "error",
  "data": {
    "code": "https://docs.eventsourcingdb.io/errors/backup-unreadable",
    "description": "backup is unreadable: the request could not be read to its end",
    "details": {}
  }
}