507 Insufficient Storage
The server cannot store the representation needed to complete the request.
Status
HTTP/1.1 507 Insufficient Storage
Details
- Category: 5xx
- Status: Standard. Registered with IANA and defined by a current standards-track RFC.
- Specification: RFC 4918 §11.5
- Cacheable: Not cacheable
- Response body: Allowed
- Retry: Retry after a delay
507 was defined for WebDAV but describes a general condition: the write cannot proceed because there is no room for it. That may be a full disk, an exhausted quota, or a storage backend refusing writes.
Unlike 413, the request is not too large in the abstract. It is too large for the space currently available, so the same request may succeed once space is freed.
Common causes
- The filesystem or volume backing the application is full.
- A per-user or per-account storage quota was reached.
- A storage backend rejected the write, for example an object store returning an out-of-space condition.
- Log or temporary files consuming the disk the application writes to.
How to fix it
As the client
- Free space or raise the quota, then retry. Nothing in the request needs to change.
- Split the upload if the shortfall is marginal.
As the server
- Alert on disk usage well before saturation. 507 is the symptom of monitoring that arrived too late.
- Rotate and ship logs off the application volume.
- Return the quota and current usage in the error body so users can act.
Examples
PUT /dav/files/large.iso HTTP/1.1
Host: files.example.com
Content-Length: 4294967296
HTTP/1.1 507 Insufficient Storage
Content-Type: application/json; charset=utf-8
{"error":"insufficient_storage","quota_bytes":10737418240,"used_bytes":10737418240}