memory leak with bun --smol
catdevnull
HOBBYOP

a year 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

8 Replies

a year ago

It's 100% related to your code and bun


a year ago

railway can't cause a memory leak


a year ago

try testing locally/docker and see if the same happens


catdevnull
HOBBYOP

a year ago

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)


a year ago

u can log console.log(heapStats()) with bun


a year ago

to see memory usaghe


a year ago

U can also set an envvar to print stats on program exit
https://bun.sh/docs/project/benchmarking#native-heap-stats


catdevnull
HOBBYOP

a year ago

thanks, this helps, i believe it's a bun node-compat problem


Loading...