## 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

1. Disable WAL mode with the environment variable before starting the crawler:

```
APIFY_LOCAL_STORAGE_ENABLE_WAL_MODE=false
```

2. 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).

3. "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.
