This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-23
Channels
- # babashka (2)
- # babashka-sci-dev (401)
- # beginners (10)
- # biff (6)
- # calva (6)
- # clj-on-windows (6)
- # cljfx (13)
- # clojure (91)
- # clojure-austin (1)
- # clojure-europe (6)
- # clojure-norway (11)
- # clojurescript (14)
- # clr (3)
- # docker (3)
- # emacs (2)
- # fulcro (21)
- # hyperfiddle (2)
- # membrane (30)
- # nbb (4)
- # pedestal (7)
- # polylith (16)
- # reitit (1)
- # sci (4)
- # xtdb (9)
Before I can start drafting the nrepl middleware, I gotta finish this client project. The last post-launch issue is that I'm hitting the memory limits of the free tier of http://fly.io. This mostly happens when the administrative deploy route is hit to fetch updated content from a headless CMS, then parsing it to download static assets. I'm using bacon so it's happening asynchronously & concurrently but sometimes it spikes, hits the 300 mb memory limit, and dies. When idle, the site seems to run just fine. If I remember right, node can be ran against a chromium debugger with some cli flags or env vars. If I could somehow get the avg memory used waiting for a specific promise to resolve, I could find the more memory-hungry parts I think. Anyway, anyone have experiencing profiling memory usage in node or nbb?
It was a while back but I've done this before when tracking down a memory leak in a component of webtorrent. I was able to dump the profile using a node flag, download it from the server, and then import it into Chrome to visualize. Let me see if I can dig up the ticket.
Ah, here's the ticket where I used the node profiler to debug a memory leak:
https://github.com/mafintosh/k-rpc/issues/13
There's not much detail on there about how, but I think I just used --prof
and then you download the dump file and import into Chrome in the profile tab.