Is it possible to change the docker run deploy command?

I'd like to change it to docker run --rm --init --ulimit memlock=-1:-1 jarredsumner/bun:edge to support Bun as a JS runtime on railway
31 Replies
JustJake
JustJake3y ago
We have many that use Bun on Railway. Shouldn’t need to change the ulimit memlock for it to work
Harris
Harris3y ago
Oh interesting, I haven't tried my project yet but milo was mentioning that the memlock bug prevents it from working properly on railway https://discord.com/channels/713503345364697088/1020034124326641804/1020035062772809728
JustJake
JustJake3y ago
Oh? CC @salvage I think that’s unrelated we had some old hosts that have since been decommissioned If not, would love more info so we can fix it
Harris
Harris3y ago
GitHub
GitHub - Milo123459/bun-railway
Contribute to Milo123459/bun-railway development by creating an account on GitHub.
Harris
Harris3y ago
I got the memlock issue
#11 [stage-0 7/8] RUN --mount=type=cache,id=s/3e3ebc25-e30d-4ad1-a02c-2543dfc5b325-/root/bun,target=/root/.bun bun i --no-save
#11 sha256:43954de8009dea5d7066f4fb5b4e1fa892fe0da7cb0fc40e03318ccc45cfc002

#11 0.611 error: memlock limit exceeded
#11 0.611
#11 0.611 To fix this error: please increase the memlock limit or upgrade to Linux kernel 5.11+
#11 0.611
#11 0.611 If Bun is running inside Docker, make sure to set the memlock limit to unlimited (-1)
#11 0.611
#11 0.611 docker run --rm --init --ulimit memlock=-1:-1 jarredsumner/bun:edge
#11 0.611
#11 0.611 To bump the memlock limit, check one of the following:
#11 0.611 /etc/security/limits.conf
#11 0.611 /etc/systemd/user.conf
#11 0.611 /etc/systemd/system.conf
#11 0.611
#11 0.611 You can also try running bun as root.
#11 0.611
#11 0.611 If running many copies of Bun via exec or spawn, be sure that O_CLOEXEC is set so
#11 0.611 that resources are not leaked when the child process exits.
#11 0.611
#11 0.611 Why does this happen?
#11 0.611
#11 0.611 Bun uses io_uring and io_uring accounts memory it
#11 0.611 needs under the rlimit memlocked option, which can be
#11 0.611 quite low on some setups (64K).
#11 0.611
#11 [stage-0 7/8] RUN --mount=type=cache,id=s/3e3ebc25-e30d-4ad1-a02c-2543dfc5b325-/root/bun,target=/root/.bun bun i --no-save
#11 sha256:43954de8009dea5d7066f4fb5b4e1fa892fe0da7cb0fc40e03318ccc45cfc002

#11 0.611 error: memlock limit exceeded
#11 0.611
#11 0.611 To fix this error: please increase the memlock limit or upgrade to Linux kernel 5.11+
#11 0.611
#11 0.611 If Bun is running inside Docker, make sure to set the memlock limit to unlimited (-1)
#11 0.611
#11 0.611 docker run --rm --init --ulimit memlock=-1:-1 jarredsumner/bun:edge
#11 0.611
#11 0.611 To bump the memlock limit, check one of the following:
#11 0.611 /etc/security/limits.conf
#11 0.611 /etc/systemd/user.conf
#11 0.611 /etc/systemd/system.conf
#11 0.611
#11 0.611 You can also try running bun as root.
#11 0.611
#11 0.611 If running many copies of Bun via exec or spawn, be sure that O_CLOEXEC is set so
#11 0.611 that resources are not leaked when the child process exits.
#11 0.611
#11 0.611 Why does this happen?
#11 0.611
#11 0.611 Bun uses io_uring and io_uring accounts memory it
#11 0.611 needs under the rlimit memlocked option, which can be
#11 0.611 quite low on some setups (64K).
#11 0.611
JustJake
JustJake3y ago
Interesting. Need more info and a much more clear bug report on buns side. Exposing any functionality is going to be subject to security review
nebula
nebula3y ago
i think you just need to upgrade the kernel on those hosts
JustJake
JustJake3y ago
The builders are running very new kernels 5.9+
nebula
nebula3y ago
Linux kernel 5.11+
JustJake
JustJake3y ago
Fkn hell
nebula
nebula3y ago
💀
JustJake
JustJake3y ago
K probably won’t happen for a bit then. At one point this worked.
nebula
nebula3y ago
buns just using a ton of new stuff ig
JustJake
JustJake3y ago
Yea I’ve mentioned it to Jarred before but compatibility is make or break
Harris
Harris3y ago
What would be the timeframe for migrating to 5.11+? Guessing I shouldn't hold my breath for it lol I'd love to switch my project over to bun, but keeping it working with railway is more important.
JustJake
JustJake3y ago
Yea not gonna happen in the next month+
Harris
Harris3y ago
😦 makes sense though
nebula
nebula3y ago
what kernels are the deployment hosts running?
JustJake
JustJake3y ago
Varies. None of them are going to be 5.11+ though So, suppose buns out until compatibility is solved
Harris
Harris3y ago
anything I could do to help this effort?
JustJake
JustJake3y ago
You’d have to ask Jarred from Bun
JustJake
JustJake3y ago
Jarred Sumner (@jarredsumner)
My goal for this week is to ship bun’s new http client. It impacts bun install and fetch() More reliable, faster, and it fixes the error about memlock/Linux kernel version incompatibility
Twitter
JustJake
JustJake3y ago
Sounds like he’s on it lol
Harris
Harris3y ago
he responded to our open issue before he tweeted about it 😄
Harris
Harris3y ago
JustJake
JustJake3y ago
Give it a go and let us know! If it's green we can include it in the changelog this week
Harris
Harris3y ago
will do discord.js doesn't support bun so can't test it properly on my one project could potentially try it on milos test repo
milo
milo3y ago
yeah give it a shot
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server