Skip to content

[Bug] Bleve full reindex has no checkpoint and OOMs the container despite a memory limit #3797

Closed

Description

@suse-coder

Describe the bug

After deleting a corrupted bleve-v5 index, startup does a full reindex of all spaces with no checkpoint. Every crash starts over. RSS grew past the container memory limit; kubelet OOMKilled PID 1 at both 20 Gi and 30 Gi. On-disk index reached ~88 GiB.

Steps to reproduce

  1. Run all-in-one OpenCloud with Bleve and a 20 Gi memory limit.
  2. Delete /var/lib/opencloud/search/bleve-v5 and start the service.
  3. Watch RSS of PID 1. Repeat with a 30 Gi limit.

Expected behavior

Reindex stays under the container memory limit. A restart does not throw away all progress.

Actual behavior

Last State:     Terminated
  Reason:       OOMKilled
  Exit Code:    137
  Started:      Thu, 22 Oct 2026 13:44:50 +0000
  Finished:     Thu, 22 Oct 2026 13:49:16 +0000

20 Gi cap: ~21 GiB RSS on PID 1. 30 Gi cap: still OOMKilled.

88.1G   /var/lib/opencloud/search

Excluding search dropped RSS from ~20–30 GiB to ~1.5 GiB. The OOM kill took down storage, proxy, postprocessing, and NATS with search.

Setup

Details

Image=docker.io/opencloudeu/opencloud-rolling:8.1.0
STORAGE_USERS_DRIVER=decomposed
STORAGE_SYSTEM_DRIVER=decomposed
SEARCH_EXTRACTOR_TYPE=tika
OC_ASYNC_UPLOADS=true
# resources.limits.memory: 20Gi, then 30Gi

Additional context

Tika is a separate pod. Workaround: OC_EXCLUDE_RUN_SERVICES / excludeServices including search.

Activity

  1. moved this from Qualification to Prio 2 in OpenCloud Team Boardon Oct 28, 2026
  2. self-assigned this
    on Nov 2, 2026
  3. aduffeck commented on Nov 2, 2026

    @aduffeck
    Member

    @suse-coder some questions to fully understand the issue:

    1. You say that "every crash starts over", but the service doesn't reindex on its own on startup. Does the load start right after the restart, or are you triggering it with opencloud search index? If so, are you using --force-rescan? Without a command it's probably the event backlog being processed, which could explain the memory usage since there's currently no concurrency limit for that.
    2. If you are running opencloud search index --all-spaces, does --concurrency 1 help?
    3. Could you get the state of the search NATS consumer while search is still excluded? NATS only listens on localhost in the all-in-one setup, so this needs a port-forward:
      kubectl port-forward pod/<opencloud-pod> 9233:9233
      nats --server nats://127.0.0.1:9233 consumer info main-queue search-pull
      
    4. A heap profile of search while the memory climbs would help a lot. Set SEARCH_DEBUG_PPROF=true, start the port-forward and take a few snapshots a minute apart:
      kubectl port-forward pod/<opencloud-pod> 9224:9224
      curl -s -o heap-1.pb.gz http://127.0.0.1:9224/debug/pprof/heap
      # wait a minute
      curl -s -o heap-2.pb.gz http://127.0.0.1:9224/debug/pprof/heap
      # and so on until shortly before the OOM
      
      Please also grab kubectl exec <opencloud-pod> -- cat /proc/1/smaps_rollup around the same time, and attach everything here.
    5. Roughly how many spaces, files and how much data are we talking about?
  4. suse-coder commented on Nov 2, 2026

    @suse-coder
    Author
    1. I did not use the trigger to scan it. It was that a lot of data was written to opencloud and the space of bleve just went above 80Gb or so where our pvc storage limit was. The Opencloud Container then restarted the whole time (as I saw in prometheus that the memory was growing very high until the container was killed (limits). Bleve/Opencloud should have not used more memory than it maximal can get (limit).
    2. was not running it
    3. sadly no state as we resolved it by giving bleve more space
    4. no heap available
    5. 5TB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions