catdevnullHOBBY
8 months ago
project id: 4c5f2c27-8083-41b1-9c64-a648a88dc7e3
running a basic telegram bot with bun --smol. is there a way to debug this? i can't tell if my code, bun, or railway is in the wrong
0 Replies
8 months ago
It's 100% related to your code and bun
8 months ago
railway can't cause a memory leak
8 months ago
try testing locally/docker and see if the same happens
not so much railway causing a memory leak, but rather measuring it wrong. it has happened to me before (comparing it on railway vs the same dockerfile in a server)
8 months ago
u can log console.log(heapStats())
with bun
8 months ago
to see memory usaghe
8 months ago
U can also set an envvar to print stats on program exit
https://bun.sh/docs/project/benchmarking#native-heap-stats