sourcebot icon indicating copy to clipboard operation
sourcebot copied to clipboard

[bug] Left over indexing shards are filling up the disk slowly

Open CyberT17 opened this issue 10 months ago • 2 comments

We have about 300gb allocated to sourcebot, and normally it only takes up 100gb of storage. But we have noticed that there are a lot of .tmp zoekt shards that are left behind that slowly take over more and more space. The ID on these temp files matches with the repo ID that constantly fail to index. Here is a chart to show you what we are seeing. We have created a clean up script that we have to run from time to time.

We have a bunch of large repos that zoekt has never been able to index. Which I suspect might be causing this?

Image

Here is an error log that I frequently see. (Also quick aside, whenever the zoekt indexer throws an error the node process gets killed, which cause the next app to restart. Minor inconvenience)

stack:  Error: Command failed: zoekt-git-index -allow_missing_branches -index /data/.sourcebot/index -max_trigram_count 50000 -file_limit 2097152 -branches "HEAD" -tenant_id 1 -repo_id 1618 -shard_prefix 1_1618 -large_file "..." /data/.sourcebot/repos/1618 
2026/01/28 16:11:14 attempting to index 6560 total files 
2026/01/28 16:11:28 symbol analysis finished for shard statistics: duration=1s symbols=1 bytes=105038110 
at genericNodeError (node:internal/errors:985:15) 
at wrappedFn (node:internal/errors:539:14) 
at ChildProcess.exithandler (node:child_process:417:12) 
at ChildProcess.emit (node:events:508:28) 
at maybeClose (node:internal/child_process:1101:16) 
at Socket.<anonymous> (node:internal/child_process:457:11) 
at Socket.emit (node:events:508:28) 
at Pipe.<anonymous> (node:net:346:12)

CyberT17 avatar Jan 28 '26 17:01 CyberT17

Hi, is this issue still there, can take it up, since I have capacity @brendan-kellam @msukkari

imsarang avatar Feb 05 '26 12:02 imsarang

@imsarang I'm taking this one. For future reference, please don't request to be assigned when there is already a assignee.

brendan-kellam avatar Feb 05 '26 23:02 brendan-kellam