507 Insufficient Storage
Usage
The 507 Insufficient Storage status code means the server does not have enough storage space to accommodate the HTTP request. This applies to a PUT or POST request normally valid and within the client’s quota, but failing because the server’s storage is full. The status was designed as part of the WebDAV specification, and the condition is expected to be temporary.
The client request must not be repeated until subsequently requested by a different action.
A related client error is 413 Content Too Large (renamed from “Payload Too Large”), indicating the request content exceeds server-defined limits. While 507 signals the server’s storage is full, 413 means the individual request body is larger than what the server is willing to process.
Example
The HTTP client attempts to transfer a file and the server responds with a 507 Insufficient Storage status code because the server is out of storage space.
Request
PUT /docs HTTP/1.1
Host: example.com
Content-Type: application/pdf
Content-Length: 10000
<PDF file included in message body>
Response
HTTP/1.1 507 Insufficient Storage
Content-Type: text/html
Content-Length: 181
<html>
<head>
<title>Insufficient Storage</title>
</head>
<body>
<p>The server has temporarily run out of
space and the file transfer failed.</p>
</body>
</html>
How to fix
The server ran out of storage while processing the request. Restore capacity, then prevent recurrence.
Immediate fixes:
Diagnosing the cause:
Preventing recurrence:
Code references
.NET
HttpStatusCode.InsufficientStorage
Rust
http::StatusCode::INSUFFICIENT_STORAGE
Rails
:insufficient_storage
Go
http.StatusInsufficientStorage
Symfony
Response::HTTP_INSUFFICIENT_STORAGE
Python3.5+
http.HTTPStatus.INSUFFICIENT_STORAGE
Apache HttpComponents Core
org.apache.hc.core5.http.HttpStatus.SC_INSUFFICIENT_STORAGE
Angular
@angular/common/http/HttpStatusCode.InsufficientStorage