{"record":{"id":"9a65fb4a9139ade1","repo":"dgtlmoon/changedetection.io","slug":"disk-quota-exceeded-cannot-save-label","errorCode":null,"errorMessage":"Disk quota exceeded: Cannot save {label}","messagePattern":"Disk quota exceeded: Cannot save (.+?)","errorType":"exception","errorClass":"OSError","httpStatus":null,"severity":"critical","filePath":"changedetectionio/store/file_saving_datastore.py","lineNumber":159,"sourceCode":"\n    except OSError as e:\n        # Cleanup temp file\n        if not fd_closed:\n            try:\n                os.close(fd)\n            except:\n                pass\n        if os.path.exists(temp_path):\n            try:\n                os.unlink(temp_path)\n            except:\n                pass\n\n        # Provide helpful error messages\n        if e.errno == 28:  # ENOSPC\n            raise OSError(f\"Disk full: Cannot save {label}\") from e\n        elif e.errno == 122:  # EDQUOT\n            raise OSError(f\"Disk quota exceeded: Cannot save {label}\") from e\n        else:\n            raise OSError(f\"I/O error saving {label}: {e}\") from e\n\n    except Exception as e:\n        # Cleanup temp file\n        if not fd_closed:\n            try:\n                os.close(fd)\n            except:\n                pass\n        if os.path.exists(temp_path):\n            try:\n                os.unlink(temp_path)\n            except:\n                pass\n        raise e\n\n","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/dgtlmoon/changedetection.io/blob/5d9c7c6da76340597243e8163c4f2439237fa0e8/changedetectionio/store/file_saving_datastore.py#L141-L177","documentation":"An OSError raised by save_json_atomic when the write fails with errno 122 (EDQUOT) — the filesystem or NFS/quota subsystem reports the user's disk quota was exceeded. Functionally identical to the disk-full path but caused by a quota limit rather than physical space.","triggerScenarios":"Saving settings or a watch entity on a quota-enabled filesystem (NFS with rpc.rquotad, shared hosting, per-user quota on ext4/xfs) and the block limit is hit during the atomic temp-file write.","commonSituations":"Shared-hosting or NAS-backed installs where the user's quota is smaller than the physical disk; team environments where several processes share one quota; monitoring-heavy accounts whose snapshots silently consume the quota.","solutions":["Check your quota: quota -s or df -h <datastore-path>; raise the quota if possible","Delete old snapshots/watch history inside the datastore directory to get back under quota","Move the datastore to a non-quota volume and restart","Set snapshot retention limits to prevent recurrence"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# NFS/quota environments: check quota before heavy saves\nimport subprocess\nsubprocess.run(['quota', '-s'], check=False)  # inspect in ops tooling","typeGuard":null,"tryCatchPattern":"try:\n    datastore.save_entity_atomic(uuid, data)\nexcept OSError as e:\n    if 'Quota exceeded' in str(e):\n        alert_ops('datastore quota exceeded'); prune_history()","preventionTips":["Alert on quota usage, not just physical disk, on NFS/shared hosting","Avoid NAS-backed datastore volumes for high-frequency watches","Prune snapshots regularly to stay under quota"],"tags":["edquot","quota","datastore","io","nfs"],"backgroundTag":"disk-quota-exceeded","analyzedSha":"5d9c7c6da76340597243e8163c4f2439237fa0e8","analyzedAt":"2026-08-27T19:41:16.067Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}