Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions docs/guide/references/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,22 @@ These errors occur when:
- A previous Trivy process did not shut down cleanly
- Trivy server is running with filesystem cache and holding a lock on the cache

#### Recommended for parallel runs / CI

If you run multiple Trivy processes concurrently (for example, CI matrix jobs or background scans), ensure that each process uses a different filesystem cache directory to avoid sharing the same BoltDB lock.

For example:

```bash
$ trivy image --cache-dir /tmp/trivy-cache-1 debian:11 &
$ trivy image --cache-dir /tmp/trivy-cache-2 debian:12 &

Note:
- No `$RANDOM` anymore
- Explicitly references what already exists conceptually
- Frames this as **recommended**, not “new”


#### Solutions

**Solution 1: Use memory cache or Redis cache** (Recommended)
Expand Down Expand Up @@ -189,17 +205,6 @@ $ ps aux | grep trivy
$ kill [process_id]
```

**Solution 3: Use different cache directories**

If you must run multiple Trivy processes with filesystem cache, specify different cache directories for each process:

```bash
$ trivy image --cache-dir /tmp/trivy-cache-1 debian:11 &
$ trivy image --cache-dir /tmp/trivy-cache-2 debian:12 &
```

Note that each cache directory will download its own copy of the vulnerability database and other scan assets, which will increase network traffic and storage usage.

### Multiple Trivy servers

!!! error
Expand Down