R
Railwayβ€’16mo ago
nr

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
Percy
Percyβ€’16mo ago
Project ID: 372e47e4-a44e-46f9-a3ea-bb0ca17b5b7d
Brody
Brodyβ€’16mo ago
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
ThallesComH
ThallesComHβ€’16mo ago
What Brody said + you can launch replicas for single threaded languages
nr
nrOPβ€’16mo ago
is a rails application we are using puma it is a multithread webserver
Brody
Brodyβ€’16mo ago
doesnt seem like it lol
nr
nrOPβ€’16mo ago
Am I wrong?
Brody
Brodyβ€’16mo ago
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
ThallesComH
ThallesComHβ€’16mo ago
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...
Brody
Brodyβ€’16mo ago
teamwork 🀝
nr
nrOPβ€’16mo ago
I think puma is multithread, let me see if I miss something in the configuration
Brody
Brodyβ€’16mo ago
does it know what to do when there are more than one cpus?
nr
nrOPβ€’16mo ago
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.
Brody
Brodyβ€’16mo ago
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 settings
nr
nrOPβ€’16mo ago
yes, deploying holly sh are you running only in 1 server? big server
ThallesComH
ThallesComHβ€’16mo ago
Nah railway has multiple servers lol
nr
nrOPβ€’16mo ago
XD just curious
Brody
Brodyβ€’16mo ago
over 250 hosts in general availability
ThallesComH
ThallesComHβ€’16mo ago
And btw the team plan includes 32cpu (per service) which is that entire server
nr
nrOPβ€’16mo ago
got it so I can enable 32 workers
ThallesComH
ThallesComHβ€’16mo ago
No you're on the dev plan
Brody
Brodyβ€’16mo ago
nope
nr
nrOPβ€’16mo ago
???
Brody
Brodyβ€’16mo ago
pro
ThallesComH
ThallesComHβ€’16mo ago
Yeah pro*
ThallesComH
ThallesComHβ€’16mo ago
Railway
Pricing
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
nr
nrOPβ€’16mo ago
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
Want results from more Discord servers?
Add your server