Skip to content

fix: remove @frenchfryai/runtime to eliminate suspected memory leak#3

Merged
tylerslaton merged 3 commits into
mainfrom
fix/remove-frenchfry-runtime
Mar 24, 2026
Merged

fix: remove @frenchfryai/runtime to eliminate suspected memory leak#3
tylerslaton merged 3 commits into
mainfrom
fix/remove-frenchfry-runtime

Conversation

@jerelvelarde

Copy link
Copy Markdown
Collaborator

Summary

  • Removes @frenchfryai/runtime dependency and the /realtime/session route registration
  • The realtime session route is unused by this demo and is the most likely source of the monotonic heap growth causing OOM crashes (WebSocket/SSE sessions that disconnect uncleanly may leave references in a session registry)
  • Per Tyler: "Realtime session isn't needed, we can remove that"

Test plan

  • Deploy and monitor heap usage — if the leak was in frenchfry, heap should stabilize instead of growing monotonically
  • Verify /api/copilotkit still works normally
  • Confirm no more exit-134 OOM crashes in Render logs

The realtime session route is unused by this demo and is the most
likely source of the monotonic heap growth causing OOM crashes.
Removing the dependency and route registration to verify.
@jerelvelarde

jerelvelarde commented Mar 24, 2026

Copy link
Copy Markdown
Collaborator Author

Clean, surgical removal — only touches what's necessary.

What looks good:

  • Minimal change scoped to exactly the unused dependency and its route registration
  • Clear rationale linking the unclean WebSocket/SSE disconnects to the monotonic heap growth
  • Test plan targets the actual concern (heap stabilization, OOM crash elimination)

Worth revisiting after deploy:

  • The resilience.js import sits right after the removed block. If that module was added specifically to work around the frenchfry leak, it may also be removable once heap usage stabilizes.
  • The blank line left between app.route(...) and the // Error resilience comment is cosmetic but could be tightened.

@tylerslaton
tylerslaton merged commit aa4a8f1 into main Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants