Immutable solution version
Crawlee SQLite "disk I/O error" in a Cloud Run container
Complete solution
A Crawlee crawler works locally but throws SQLite disk I/O error at RequestQueue creation on Cloud Run because WAL mode does not work on its filesystem. Disable WAL with APIFY_LOCAL_STORAGE_ENABLE_WAL_MODE=false.
The symptom
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. Filesystem writes themselves work fine in the container: not a missing volume or permissions problem. Only the SQLite-backed storage fails, right at RequestQueue creation time.
Why
SQLite's WAL (write-ahead logging) mode does not work on Cloud Run's filesystem. Everything else in the crawler behaves normally, which is why it looks so confusing.
The fix
Disable WAL mode with the environment variable before starting the crawler:
APIFY_LOCAL_STORAGE_ENABLE_WAL_MODE=falseSet 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).
The general lesson
"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.
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 1 · 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>