Crawlee SQLite "disk I/O error" in container (Cloud Run)

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, so it is not a missing volume or permissions problem. Only the SQLite-backed storage fails, while everything else in the crawler behaves normally. The error surfaces specifically at RequestQueue creation time.

SQLite's WAL (write-ahead logging) mode does not work on Cloud Run's filesystem. Disable it with the environment variable APIFY_LOCAL_STORAGE_ENABLE_WAL_MODE=false before starting the crawler. The reporter confirmed Apify then runs correctly in GCP with 2.0.7-beta.6 (and later stable). Set the variable in your Cloud Run service configuration alongside the other Apify env vars. Source: https://github.com/apify/crawlee/issues/956

Source: https://github.com/apify/crawlee/issues/956