Is there a way to set LND caches.rpc-graph-cache-duration / gossip rate values in the LND package config?

Running the LND package (0.21.2-beta) on StartOS. I’m hitting intermittent LND health-check flapping — peers pong-timeout and disconnect, and the synced-true daemon cycles. The node itself is fine underneath (channels open, chain synced); it’s the health check tripping while LND’s main loop is briefly stalled.

I’ve traced the trigger to graph-heavy clients hitting LND at the same time — Mempool’s Lightning backend and RTL’s node view both do full DescribeGraph-style scrapes, and it also coincides with a peer doing a full historical gossip sync. When two of those overlap, LND stalls long enough (30s+ pong waits, occasionally 90s) to fail the check.

LND’s own routing-node docs point at exactly this symptom and give config values for it:

  • caches.rpc-graph-cache-duration=10m (caches the DescribeGraph response so repeated dashboard scrapes don’t re-hit the graph DB)

  • gossip.msg-rate-bytes / gossip.msg-burst-bytes / num-restricted-slots (for the peer-disconnect churn)

My question: is there a way to set these in the LND service config that I’ve missed? I’ve looked through the package config and don’t see a custom/advanced lnd.conf area, but I might be overlooking it. If it’s not currently exposed, would it be possible to surface these values (or a raw lnd.conf passthrough) in the package?

For now I’ve worked around it by moving graph-heavy dashboards off LND (Mempool Lightning disabled, RTL pointed at CLN), but the cache/gossip settings look like the proper fix.

Hardware for context: OptiPlex 3070 (i5-9500T, 24GB) — so it’s not a resource limit, it’s slow graph queries blocking the loop.

Thanks!

You’re not missing anything — the Performance action only exposes GC-canceled-invoices (startup/live), stagger-initial-reconnect, ignore-historical-gossip, and strict-graph-pruning. The graph-cache duration and gossip rate-limit settings aren’t wired into any StartOS action right now.

You don’t need them exposed to use them, though. lnd.conf on StartOS merges your existing values on every start rather than rewriting the whole file — only a handful of specific keys (listen addresses, db backend, a couple Bitcoin-derived values) get force-rewritten. Everything else, including your [caches]/[gossip] sections, gets left alone.

So: SSH in, start-cli package attach lnd, edit /root/.lnd/lnd.conf directly, add your settings, exit, then restart the service so LND picks them up. Should stick across restarts — I’d just double check it’s still there after your next LND update, since that’s the one case I can’t personally vouch for.

If you’d rather see this properly exposed instead of hand-editing, feel free to open an issue on Start9Labs/lnd-startos — the Performance action already exists, so it’d just be a couple more fields on an existing form.

Many thanks for your prompt reply. Very helpful.