cap_disk

LimitSeen in: Runs

What happened

A run has a limit on the scratch space on disk. When the script goes over, the sandbox stops it and the run ends with this code. detail names the cap (scratch_mb), how much was used and how much was allowed. The caps for a run are in the code sandbox section of the Limits page.

What to do

Write less to disk, or none: keep intermediate results in memory.

Example

json
{
  "request_id": "7d2b1c44-95a0-4e3b-8a6f-1c0d9e2f5a37",
  "ok": false,
  "error": {
    "code": "cap_disk",
    "message": "The script wrote more scratch data than allowed.",
    "detail": {
      "cap": "scratch_mb",
      "used": 640,
      "allowed": 512
    }
  }
}

Ask about this in the forum