Troubleshooting
When something goes wrong, start with the log file. PII Crawler writes one automatically on every run, including desktop launches where no terminal is attached.
Where the log file lives
| Platform | Path |
|---|---|
| macOS | ~/Library/Logs/PIICrawler/piicrawler.log |
| Windows | %LOCALAPPDATA%\PIICrawler\Logs\piicrawler.log |
| Linux | ~/.local/state/piicrawler/piicrawler.log (or $XDG_STATE_HOME/piicrawler/piicrawler.log if you have set XDG_STATE_HOME) |
On macOS you can also open the log through the built-in Console app: it appears under Reports → Log Reports as part of your user log folder, or just press Cmd+Shift+G in Finder and paste the path above.
When the log grows past 5 MB, it is moved aside to piicrawler.log.1 and a fresh log is started, so the pair never takes more than about 10 MB of disk. This happens as the log fills, not only at startup, so a long-running watch or serve stays inside the same ceiling.
If you want the log somewhere else (for example when collecting logs from a fleet), set the PIICRAWLER_LOG_FILE environment variable to a full file path. It overrides the default location.
To record less, or nothing, set the level: --log-level warn keeps the warnings and errors, and --log-level off writes no log at all. A scan's log names every file it read, so off is the setting for a machine that should not keep that list. PIICRAWLER_LOG_FILTER sets the same thing for every run on the machine, and the flag overrides it when you need one run's log back. See the CLI reference.
Reading the log in the web UI
The Logs page (under System in the sidebar) shows the most recent 1,000 entries and updates every few seconds while Auto-refresh is on.
- Search: type in the search box to show only the entries that contain your text, in either the message or its details. Matches are highlighted and the count above the list reads, for example, "6 of 840 entries". Press
/to jump to the search box andEscto clear it. Search works together with the level filter, so Warn+ plus a file name shows only the warnings about that file. - Copy puts the entries you are looking at on the clipboard, one per line, in the same format as the log file. If a search is active, only the matching entries are copied.
- Download saves those same entries as a
.txtfile. - Full log file downloads the whole log from disk, including the previous log if there is one. It goes back much further than the 1,000 entries on the page, and is still there after you press Clear, which only empties the page. This is the file to attach when you contact support.
The list follows new entries as they arrive. Scroll up to read something and it stays still; a button at the bottom of the list counts the entries that came in since you scrolled away (for example "3 new entries"). Click it to jump back to the newest entry and resume following.
The app shows "PII Crawler failed to start"
If PII Crawler hits a fatal error while starting from the desktop (double-clicking the app on macOS, or the Start Menu shortcut on Windows), it shows an error dialog with the reason instead of silently refusing to launch. The same text is written to the log file at the path the dialog shows.
Common causes:
- The database could not be opened or upgraded. Your scan database lives at
~/.piicrawler/piicrawler.db, or in the folderPIICRAWLER_DATA_DIRnames if you have moved it. If the dialog mentions a database or migration error, copy the exact message into a support request; do not delete the database, your scan history and triage verdicts are in it. - "The database file is locked." Another copy of PII Crawler is using the database, usually a command-line scan, watch mode, or the terminal UI running in another window. The app waits up to 30 seconds for the other copy to finish its current write before giving up, so this dialog means the database stayed busy longer than that. Close or finish the other copy, then launch PII Crawler again. Nothing is damaged and no data is lost.
Launching when a copy is already running
PII Crawler runs as a single instance. If you double-click the app (or the Start Menu shortcut) while a copy is already running, the second launch does not start a new server; it opens the web UI of the copy that is already running in your default browser. You can also just open http://localhost:3001 yourself. This is why you only ever see one PII Crawler window even after clicking the shortcut a few times.
If the dialog itself is not enough to resolve the problem, send us the dialog text plus the last ~50 lines of the log file and we can usually pinpoint the cause quickly.
A scan is stuck on "scanning"
A scan records its own status as it works, so one whose process is killed before it finishes (Ctrl+C, a crash, an out-of-memory kill, a reboot) never gets to write a final status. It keeps saying scanning in piicrawler scans and in the scan list, however long ago it stopped.
Clear it with:
piicrawler scans prune
That marks every interrupted scan stopped, keeping what it had already found. Only run it when no scan is in progress: PII Crawler cannot tell an abandoned scan apart from one another process is still working on, so pruning during a live scan marks that one stopped too. The terminal UI and the web UI do the same cleanup on startup, so opening either also clears a stuck scan.
To remove the scan altogether, findings and all, use piicrawler scans delete <id>.
The same command clears the other two rows a killed process leaves behind: a scan that was set up and never started (it reads pending 0/0 and is listed as not searched in every DSAR answer) is removed, and one killed while it was being deleted — hidden from every listing, and still holding every file and finding it recorded — has its deletion finished and its disk space returned. On a headless install nothing else did either; the terminal UI and the web UI finish interrupted deletes at startup. See scans prune.
The Files list of a very large scan is slow to filter by type
On scans with millions of findings, PII Crawler keeps a count of each file's findings per PII type so that filtering the Files list by a type (Name, Email, and so on) stays fast on every page. The web UI, the terminal UI, and piicrawler serve build these counts in the background, one finished scan at a time, and keep them current as you mark findings, files, folders, or text as false positives or confirmed.
Until a scan's counts are ready, filtering its Files list by type still works but can be slow on the largest scans. That happens:
- right after updating PII Crawler, for scans that were already in the database;
- after a scan finishes, stops, or is resumed and then finishes again.
Building the counts takes up to about a minute per 10 million findings. You can keep using the app while it runs. The Logs view shows Counting findings per file for scan <id> when it starts and Finding counts for scan <id> ready when it is done. Leave the app open until then; if you close it, the count picks up where it left off the next time you open it.
Commands that run and exit, such as piicrawler scan, do not build the counts. A scan saved from the command line gets its counts the next time the web UI, the terminal UI, or piicrawler serve is running.
The web UI says "Server disconnected"
The banner means the browser cannot reach PII Crawler at all: the app was closed, the computer went to sleep, or something on the network is blocking the connection. A busy server does not trigger it, so a large scan can run with the page open. The banner clears on its own as soon as the app answers again; you do not need to reload the page.
If the banner stays up, check that PII Crawler is still running. When it was started from a terminal, the terminal shows why it stopped; otherwise see where the log file lives.
"There is no terminal to draw the interactive UI on"
Run with no arguments, PII Crawler opens its interactive terminal UI, and that needs a terminal to draw on. Three situations do not have one, and all three now say so and exit rather than failing obscurely:
-
Over ssh without a terminal.
ssh myhost piicrawlergives the remote command a pipe, not a terminal. Ask for one with-t:ssh -t myhost piicrawler -
From a script, a cron job or CI. There is no terminal to attach at all. Name what you want done instead of opening the UI, for example:
piicrawler scan /srv/share --jsonOr serve the web UI and point a browser at it:
piicrawler serve. -
With the output redirected.
piicrawler > out.txtsends the UI's drawing to the file instead of to your screen, so there would be nothing to look at and no way to see what you were typing. Leave the output on the terminal, and capture results with a command that produces them:piicrawler scan /srv/share --json > findings.json.
Starting from a terminal to see errors live
Every desktop launch is the same binary as the CLI. Running it from a terminal prints errors directly:
piicrawler serve
On macOS the bundled binary is inside the app: /Applications/PIICrawler.app/Contents/MacOS/piicrawler serve. On Windows it is piicrawler.exe serve in the install folder.