New app builder: app's git storage loads every loose object from S3 on each request, so a large repo takes down self-hosted backend pods

My goal:

Keep using the new app builder on an actively developed React app without opening it in the builder taking down our backend pods. Ideally that means a supported way to pack or compact an app's git storage, or confirmation that packing or caching is planned.

Issue:

Opening one of our React apps in the new app builder overloaded both main-backend pods. They failed their liveness probes and Kubernetes restarted them at the same time, so users got 503s for about 4 minutes.

The app's git storage in S3 is all loose objects and has never been packed:

[rr.git_storage] Client created looseObjects=2615 packFiles=0 refs=66
[rr.git_storage] Loaded repo from blob storage looseCount=2615 looseBytes=2.6MB packCount=0 looseMs=22662

The effective git config disables housekeeping:

gc.auto=0
maintenance.auto=false
receive.unpacklimit=1000000
receive.autogc=false

The app itself is only about 356 files (about 2 MB), so most of those objects are history: version history and builder branches.

Each GET /api/ai/rr/git/v2/apps//files reloads the whole repo from S3, one GET per object, and nothing seems to be cached between requests. One load takes 7–13s. The builder sends several of these requests at once, and with 3–4 running on the same pod each took 22–56s. While that runs, the pod is too busy to answer /api/checkHealth, so the liveness probe kills it. The builder's retried requests then do the same to the other pod.

The repo grows with every save and builder session, so this will keep getting worse for any app under active development.

Retool version & hosting setup:

  • Self-hosted 4.34.4-stable (tryretool/backend)
  • AWS EKS, Helm chart, 2 main-backend replicas (4 CPU / 8 GiB limit each)
  • Retool database: RDS PostgreSQL (db.m5.large)
  • New app builder git storage: S3 (RR_DEFAULT_S3_*)

Error message(s) or screenshots:

@smithy/node-http-handler:WARN - socket usage at capacity=50 and 100 additional requests are enqueued.

"message":"Health check error","err":{"message":"Database connection timed out."}

Liveness probe failed: Get "http://:3000/api/checkHealth": context deadline exceeded
Container main-backend failed liveness probe, will be restarted

What I've tried so far:

  • Ruled out the database. RDS was idle throughout (about 6% CPU, sub-millisecond latency, around 115 connections), so the "Database connection timed out" health check error comes from the backend being overloaded, not from Postgres.
  • Ruled out memory. The pods were using about 3 GiB of their 8 GiB limit, and nothing was killed for running out of memory.
  • Traced the restarts to the /files requests through request logs and [rr.git_storage] timings.
  • Checked the stable (4.34.5, 4.34.6) and edge (up to 4.66) release notes and found nothing about packing or caching the builder's git storage.

Questions:

  1. Is there a supported way to pack or compact an app's git storage, or to prune old history?
  2. Are there plans to pack repos (periodically, or on save), or to cache a loaded repo per pod?
  3. Is there a setting to limit how many of these repo loads run at once, or to raise the S3 client's connection limit?
  4. Until then, is there a recommended workaround other than recreating the app?

Summary

On self-hosted Retool 4.34.4-stable (AWS EKS, S3-backed git storage), opening a React app in the new app builder causes the app's Git repo β€” stored as thousands of unpacked loose objects in S3 β€” to be fully reloaded (one GET per object, 7–13s each) on every /files request with no caching. Several concurrent loads saturate the backend pods, which then fail their liveness probes and get restarted, producing ~4 minutes of 503s; the report asks whether there's a supported way to pack/compact/prune the repo, whether packing or per-pod caching is planned, and whether repo-load concurrency or the S3 client connection limit can be tuned.

AI Response

After a thorough search of the Retool Community forum and the product/self-hosted documentation, no directly relevant resource was found that documents a supported way to pack, compact, or prune the new app builder's Git storage, confirms plans for repo packing or per-pod repo caching, or exposes a setting to limit concurrent repo loads or raise the S3 client connection limit. The self-hosted architecture documentation only affirms that object (blob) storage is where new-app-builder Git repositories are kept and which services (rr.gitServer, agent-sandbox) manage the editing experience β€” it does not address repo compaction, caching, or S3 client tuning. Because this appears to be a specific, not-yet-documented behavior, the most accurate response is that there is currently no published workaround or configuration for it rather than pointing to tangential material; this detailed reproduction (with the [rr.git_storage] timings and gc/maintenance config evidence) is itself valuable and the thread remains the clearest public record of the behavior.

Sources

The Community Team is testing out a new automation. Let us know if it's helpful (or not) by leaving a :heart:, :+1:, or :-1:. Or by marking this post as the "Solution"! Let us know if you have any feedback here. :rocket: