HTTP status code · Server errors (5xx)
507 Insufficient Storage
507 Insufficient Storage means the server could not complete the request because it cannot store the data the request needs. The most common cause is a full disk or an exhausted storage quota on a WebDAV, Nextcloud or similar file server during an upload.
| Class | 5xx, Server errors |
|---|---|
| Defined in | RFC 4918 §11.5 |
| Cacheable by default | Only with explicit Cache-Control or Expires |
| Safe to retry | Not automatically; RFC 4918 says a user-triggered request must wait for a new user action |
| Relevant headers | None specific to this code |
What 507 means
RFC 4918, the WebDAV specification, defines 507 in section 11.5: the method could not be performed because the server is unable to store the representation needed to complete the request. The RFC calls the condition temporary, but adds that if a user action caused the request, it must not be repeated until the user acts again, so clients should not retry uploads in a loop.
Outside WebDAV, file sync services and storage APIs use 507 for "you are over quota", which is more precise than 413 (this single body is too large) or 403. One oddity: AWS Application Load Balancers document 507 for a redirect URL that is too long, which has nothing to do with disk space.
Common causes
If you are visiting the site
- Your account on a cloud storage or sync service is over its quota.
- The server you upload to has run out of disk space for everyone.
If you run the server
- The data volume is full, often filled by logs, temporary upload chunks or old backups rather than user data.
- A per-user or per-folder quota in Nextcloud, ownCloud or another WebDAV server is exhausted.
- Inodes are exhausted even though df -h shows free space, because of millions of small files.
How to fix it
If you are visiting the site
- Delete files or empty the trash in the service (trash usually counts against the quota), or upgrade the plan.
- If your quota is fine, contact the service: the server itself is out of space.
If you run the server
- Check free space and free inodes (df -h and df -i) on the volume the app writes to, and find what grew with du -sh /path/* | sort -h.
- Rotate logs, clean temporary upload directories and move backups off the data volume.
- Raise or reset the user quota, and alert on disk usage before it reaches 100%.
How to send 507
app.put('/files/:name', (req, res) => {
res.status(507).json({ error: 'Storage quota exceeded' });
});// app/files/[name]/route.ts
export async function PUT() {
return Response.json({ error: 'Storage quota exceeded' }, { status: 507 });
}mux.HandleFunc("PUT /files/{name}", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusInsufficientStorage) // 507
w.Write([]byte(`{"error":"Storage quota exceeded"}`))
})from fastapi import FastAPI, HTTPException
app = FastAPI()
@app.put("/files/{name}")
def upload_file(name: str):
raise HTTPException(status_code=507, detail="Storage quota exceeded")Commonly confused with
- 507 vs 413
- 413 Content Too Large means this one request body exceeds a size limit; 507 means the server or your quota has no room left, whatever the size.
- 507 vs 508
- Both come from the WebDAV family of RFCs, but 508 is about an infinite loop in a Depth: infinity operation, not storage.
Frequently asked questions
- How do I fix 507 Insufficient Storage?
- If it is your account, free up space or empty the trash in the storage service. If you run the server, check df -h and df -i on the data volume, clean up logs and temporary files, and raise the quota if appropriate.
- Should a client retry after a 507?
- Not automatically. RFC 4918 says that if a user action caused the request, it must not be repeated until the user acts again, for example after freeing space.
- Is 507 only for WebDAV?
- It was defined in the WebDAV RFC, but any HTTP server may use it. Storage APIs and sync services use it for quota errors because it is more specific than 403 or 413.
Last reviewed by Arielton Oberek.