Application only up to 1 cpu
Hello my app has some high load endpoints, when a user hit 1 of those the app goes from 0.x to 1.0cpu and stay there and slow down/freeze the entire server, it didn't scale more than that. Is there any configuration that I missing?
Project Id: ff465d8d-1ddf-4210-994a-e6f8c9302e9
Service Id: 372e47e4-a44e-46f9-a3ea-bb0ca17b5b7d
26 Replies
Project ID:
372e47e4-a44e-46f9-a3ea-bb0ca17b5b7d
not a railway issue, if your app is only using 1vcpu then you are probably running a single threaded app
what kind of app is this
What Brody said + you can launch replicas for single threaded languages
is a rails application we are using puma
it is a multithread webserver
doesnt seem like it lol
Am I wrong?
so with the railway hobby plan you get up to 8 vcpu, not 8 cores, it would seem your app doesnt know how to utilize multiple cpus
Ruby by default is single thread but you can launch extra threads if you want.
Ref: https://stackoverflow.com/questions/12766456/in-what-way-is-ruby-on-rails-not-multithreaded
Stack Overflow
In what way is Ruby on Rails NOT multithreaded?
Disclaimer: I'm a c# ASP.NET developer learning "RoR". Sorry if this question doesn't "get" RoR, any corrections greatly appreciated!
What is multithreading
My understanding of "multithread" abil...
teamwork π€
I think puma is multithread, let me see if I miss something in the configuration
does it know what to do when there are more than one cpus?
Deploying Rails Applications with the Puma Web Server | Heroku Dev ...
A guide to using Puma on Heroku. Puma uses threads, in addition to worker processes, to make more use of a systems available CPU.
see how the cpu's are layed out here, ignore it saying 32 π
https://utilities.up.railway.app/stats
you can set
WEB_CONCURRENCY
yourself in the service settingsyes, deploying
holly sh are you running only in 1 server?
big server
Nah railway has multiple servers lol
XD just curious
over 250 hosts in general availability
And btw the team plan includes 32cpu (per service) which is that entire server
got it
so I can enable 32 workers
No you're on the dev plan
nope
???
pro
Yeah pro*
Railway
Pricing
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
I was only 1 message to ask "why" to someone in my team lol
still building, I'll let you know if everything is ok after this.
thank u for the quick response guys