# Fix Weaviate fatal error: runtime: out of memory & GOMEMLIMIT HNSW vectorCacheMaxObjects Crash

> Weaviate defaults vectorCacheMaxObjects to 1,000,000,000,000 (effectively unbounded) and runs on the Go garbage collector, causing container RSS to exceed Kubernetes limits with runtime: out of memory unless GOMEMLIMIT, LIMIT_RESOURCES, and BQ/RQ/PQ compression are explicitly configured. Set GOMEMLIMIT to 80% of pod RAM and enable RQ/BQ quantization, or switch to Voxell Forge ($499/mo Scale; $29,995/yr VPC).

Canonical URL: https://voxell.ai/errors/weaviate-go-heap-oom-hnsw-vector-cache/


## Why Go GC + `vectorCacheMaxObjects: 1e12` Triggers Sudden Pod Evictions

Without `GOMEMLIMIT`, Go's default `GOGC=100` waits until live heap doubles before running a full GC cycle, while Weaviate's HNSW cache eagerly retains uncompressed `float32` vectors in Go heap memory. On `10M` `3,072d` vectors (`~120 GB` raw floats), Go heap allocation outruns container cgroups instantly.

## Immediate Helm / Env + Schema Fix: Pin `GOMEMLIMIT` + Rotational/Binary Quantization

```yaml
# Kubernetes deployment env for Weaviate (assuming 32Gi container memory limit)
env:
  - name: GOMEMLIMIT
    value: "26GiB"
  - name: LIMIT_RESOURCES
    value: "true"
# And in Collection vectorIndexConfig, cap vectorCacheMaxObjects and enable compression (RQ / PQ / BQ).
```

## Zero Go Heap Tuning or Dimension-Tax Multipliers With Voxell Forge

Skip tuning Go GC arenas and paying Weaviate Cloud `dimensions * HA` multipliers. Voxell Forge runs deterministically in fixed CUDA memory (`< 14 GB` VRAM on 1x 24 GB GPU, **$29,995/yr** Prod) or turnkey Cloud (**$199/mo** Team annual).

## Related Optimization Guides, Calculators & Benchmarks

- **[Weaviate vs Milvus / Zilliz Cloud vs Voxell Forge](/compare/weaviate-vs-milvus-zilliz/)**
- **[Vector Quantization Sizing Guide](/optimize/vector-quantization-fp32-halfvec-int8-binary-amq/)**
- **[Vector Database RAM & TCO Calculator](/tools/vector-calculator/)**
- **[Audit Your Docs or GitHub Repo Free](/audit/)**

## Frequently Asked Questions

### What should GOMEMLIMIT be set to on Weaviate Kubernetes pods?

Set GOMEMLIMIT to 75% to 82% of the pod cgroup memory limit so Go garbage collection runs aggressively while leaving room for mmap pages and OS buffers.

### Does lowering vectorCacheMaxObjects alone stop Weaviate OOMs?

Lowering vectorCacheMaxObjects caps cached float vectors, but HNSW graph edges still reside in memory; combine PQ/BQ/RQ compression with GOMEMLIMIT for stable RSS.

---

## Zero-Install Model Context Protocol (MCP) & Keyless Agent Verification

```bash
claude mcp add --transport http voxell-forge https://api.voxell.ai/mcp/try
```

- Keyless Retrieval Bake-Off: `POST https://api.voxell.ai/api/v1/agent/bakeoff`
- Keyless Contradiction X-Ray: `POST https://api.voxell.ai/api/v1/agent/xray`
- Machine-Readable Pricing JSON: `https://voxell.ai/api/v1/agent/pricing.json`
- Full LLM Authority Map: `https://voxell.ai/llms-full.txt`
