memory leak with bun --smol
catdevnull
HOBBYOP

2 years 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

2 years ago

It's 100% related to your code and bun


2 years ago

railway can't cause a memory leak


2 years ago

try testing locally/docker and see if the same happens


catdevnull
HOBBYOP

2 years 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)


2 years ago

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


2 years ago

to see memory usaghe


2 years ago

U can also set an envvar to print stats on program exit

https://bun.sh/docs/project/benchmarking#native-heap-stats


catdevnull
HOBBYOP

2 years ago

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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...