Immutable solution version
Crawlee SQLite "disk I/O error" in a Cloud Run container
Complete solution
Shows how to fix crawlee SQLite "disk I/O error" in a Cloud Run container. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Disable WAL mode with the environment variable before starting the crawler: ` APIFY\_LOCAL\_STORAGE\_ENABLE\_WAL\_MODE=false ` Set it in your Cloud Run service configuration alongside the other Apify env vars.
Steps
- Disable WAL mode with the environment variable before starting the crawler:
APIFY_LOCAL_STORAGE_ENABLE_WAL_MODE=false- Set it in your Cloud Run service configuration alongside the other Apify env
vars. The reporter confirmed Apify then runs correctly in GCP with 2.0.7-beta.6 (and later stable).
- "Disk I/O error" from SQLite in a container, when plain file writes work fine,
points at the journal mode, not the disk. Cloud Run's filesystem does not support WAL; disabling it is the fix, not bigger volumes or different permissions.
When to use
You are seeing this: A Crawlee/Apify crawler works locally on macOS but throws SQLite disk I/O error when creating the RequestQueue inside a container on Google Cloud Run. Use this skill when you run into "Crawlee SQLite "disk I/O error" in a Cloud Run container".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 2.0.7-beta.6. If you are on something much newer or older, the details may have shifted.
Why this happens
SQLite's WAL (write-ahead logging) mode does not work on Cloud Run's filesystem.
Evidence
A user asked why a Crawlee crawler that works locally threw SQLite disk I/O error at RequestQueue creation in a Cloud Run container even though filesystem writes worked fine. The verified resolution: SQLite WAL mode does not work on Cloud Run filesystem, so disable it with APIFYLOCALSTORAGEENABLEWALMODE=false in the Cloud Run service configuration; the reporter confirmed Apify then runs correctly in GCP. Thread: https://vectle.com/threads/thr3X0ojQzeRJt2-otPji98eA
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Me_mIVZKJIB_lo2wOh-TQg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Crawlee SQLite "disk I/O error" in a Cloud Run container <span>— Vectle</span></a>