R
Railway

βœ‹ο½œhelp

How does pro plan upgrade works for application? particularly Spring boot app...

Bbharadwaj9/17/2023
Hi all, I find it difficult to understand how pro plan upgrade works. I upgraded my Spring boot app from hobby plan to pro, and the response times of the requests are still the same. It looks like the deployement did not happen on 32vCPU machine, someone please help me understand what am I missing please! Thank you so much! πŸ˜„

project id: c1f08a11-d87a-4728-ad7f-08846fb099c2
Bbrody1929/17/2023
^
Bbharadwaj9/17/2023
c1f08a11-d87a-4728-ad7f-08846fb099c2
Bbrody1929/17/2023
have you changed the region your service is in to one that is closer to you or your database?
Bbharadwaj9/17/2023
From my home computer when I submit the request I am able to get a response in 3 seconds tops, whereas the railway app is taking 20 seconds 😦
using the same database for both home pc and railway app
Bbrody1929/17/2023
oh well pro isn't gonna help with code issues
Bbharadwaj9/17/2023
will the deployment happen on 32 Core machine?
I think the problem I am facing is because of low end infrastructure
Bbrody1929/17/2023
if you moved your project over to the pro region of the dashboard and redeployed, yes
the hobby plan had 8gb of ram and 8 vcpu, where you maxing those resources out previously?
Bbharadwaj9/17/2023
I was not maxing out the resources there, the cpu usage was low. but the requests serving are taking a lot of time on 1-2 vcPU
running apache tomcat, Java Spring Boot api application
Bbrody1929/17/2023
then pro isn't gonna help you, that's like having a 10 amp charger and plugging in a phone that only takes 2 amps to charge, your phone will not charge any faster
the hobby and the pro plan both use the same cpu type, just the pro plan has more of them
if you weren't utilizing all the resources on the hobby plan, having more resources won't speed anything up
Bbharadwaj9/17/2023
I understand the logic. But the same code is running very fast on my 16 core machine
Bbrody1929/17/2023
unfortunately that does not rule out a code issue
Bbharadwaj9/17/2023
sometimes I hit the peak of 7 vCPU usage
Bbrody1929/17/2023
I'd recommend time logging different functions of your request to see what is taking 20 seconds
but have you dragged the project over to the pro region of the dashboard?
Bbharadwaj9/17/2023
Bbharadwaj9/17/2023
I see this service using 6 vCPU, that means it must be in Pro workspace right? :/
Bbharadwaj9/17/2023
Bbharadwaj9/17/2023
this is in railway see the response time in 10.6 seconds 😦
Bbharadwaj9/17/2023
Bbharadwaj9/17/2023
same code run in another environment is taking only 1.1 seconds
Jjoshmo_dev9/17/2023
are you sure this isn't because of latency or a similar issue?

not to seem like an idiot, but always helpful to quickly check
Bbrody1929/17/2023
you have yet to answer my question
Bbharadwaj9/17/2023
absolutely, the database I am connecting to is AWS RDS
yes, I have dragged it to the pro user
Bbrody1929/17/2023
can you show a screenshot of the dashboard?
Bbharadwaj9/17/2023
Bbharadwaj9/17/2023
can you make sense of this Brody? I can share another screenshot
Bbrody1929/17/2023
okay so lets focus on the latency issue josh brought up
what region is your aws rds database in?
Bbharadwaj9/17/2023
are we deployed in pro?
Bbrody1929/17/2023
have you redeployed your service since draging the project over to the pro area? yes or no
Bbharadwaj9/17/2023
yes
I did multiply deploys and restarted too
trying to find the region of the aws
Bbrody1929/17/2023
then you are deployed with pro resources
okay let me know when you find out
Bbharadwaj9/17/2023
it's in Mumbai, India πŸ˜›
Bbrody1929/17/2023
aws has regions there?
Bbharadwaj9/17/2023
latency could be the issue you say?
Aa_dumb__9/17/2023
200%
Yes
Bbharadwaj9/17/2023
haha yes, they are everywhere
Aa_dumb__9/17/2023
Just hopping in to say yes, the latency between your service and your db is 100% the issue here. When running from your machine, I'm assuming you're relatively close to the db
Bbharadwaj9/17/2023
wow, now that I think
Bbrody1929/17/2023
i think india is closer to railway's Singapore region
Aa_dumb__9/17/2023
Additionally, upgrading to 32VCPU will not affect latency, it will only use more CPU if your app needs it.
Agreed, but your db and your service should be in the same region no matter what
When developing you can handle some extra latency. Your app in production should have as little as possible
Bbharadwaj9/17/2023
the app deff can use it, as it's an api application written in Spring boot
Yes!
Bbrody1929/17/2023
in every service that accesses the rds database set a service variable RAILWAY_REGION to asia-southeast1
Bbharadwaj9/17/2023
can I add this as shared variable?
Bbrody1929/17/2023
nope
people have had trouble with that
Bbharadwaj9/17/2023
oh no then where do I add this variable, please help me
Bbrody1929/17/2023
in the service variables
Bbharadwaj9/17/2023
can I add it in Docker file? as an environment variable?
Aa_dumb__9/17/2023
I believe it's not working as a shared variable atm. Users have reported this as an issue and the team is aware
Bbrody1929/17/2023
service variables
Bbharadwaj9/17/2023
ah gotcha!
Initializing and deploying now πŸ˜„
Bbrody1929/17/2023
check the first log line for the build logs, does it say the correct region there?
Bbharadwaj9/17/2023
nope says [us-west1]
Bbrody1929/17/2023
looks like you may have done something wrong, can you please provide the same screenshot i sent you just now
Bbharadwaj9/17/2023
Bbrody1929/17/2023
show the variable please
Bbharadwaj9/17/2023
sorry
Bbharadwaj9/17/2023
Bbrody1929/17/2023
and did you let it kick off another deployment?
Bbharadwaj9/17/2023
yes, should I try redeploying?
Bbrody1929/17/2023
sure
Bbharadwaj9/17/2023
doing it now
no luck :/
after redeploying too it's the same
Bbrody1929/17/2023
show me?
Bbharadwaj9/17/2023
Bbrody1929/17/2023
these highly cropped screenshots aren't doing you any favors
Bbharadwaj9/17/2023
haha my apologies
Bbrody1929/17/2023
please resend the last two screenshots without cropping
Bbharadwaj9/17/2023
Bbrody1929/17/2023
that is still a cropped screenshot
Bbharadwaj9/17/2023
Bbrody1929/17/2023
bruh
Bbharadwaj9/17/2023
the urls are gettign exposed so pls understand
this screenshot doesn't work either is it?
Jjoshmo_dev9/17/2023
looks like it's still going to us-west1
Bbharadwaj9/17/2023
yes
Bbrody1929/17/2023
is that project located in your pro section of the dashboard
Bbharadwaj9/17/2023
Bbrody1929/17/2023
does the variable name or variable value have a space in it or something
Bbharadwaj9/17/2023
are the projects in pro though?
Bbrody1929/17/2023
ive already said yes
Bbharadwaj9/17/2023
nope
should I include like this [asia-southeast1]?
Bbrody1929/17/2023
no
Bbharadwaj9/17/2023
or is there a hypen missing somewhere?
I can try testing with another region and check if it's working there
from what I see in docs railway seems to be only in one location of us-west
Bbharadwaj9/17/2023
I see that I need to be in priority boarding to access these locations
let me try signing up for the beta access. I think that was the problem πŸ™‚
Bbrody1929/17/2023
i forgot all about that
Bbharadwaj9/17/2023
ah happens! signing up now
Bbharadwaj9/17/2023
Bbharadwaj9/17/2023
it's in ap south now!!
Bbrody1929/17/2023
awsome!
Bbharadwaj9/17/2023
Bbharadwaj9/17/2023
and the response times are at 2.77 seconds!!
that's awesome!
it's been very helpful @Brody great find by @joshmo_dev ! thank you @a_dumb__!
Bbrody1929/17/2023
now move your aws rds database to Singapore too, for an even faster rtt
Bbharadwaj9/17/2023
absolutely! my god yes! πŸ˜„
Bbrody1929/17/2023
and now you have a pro discord badge too
Bbharadwaj9/17/2023
oh is it? where can I find it?
Jjoshmo_dev9/17/2023
nice, great job
Bbharadwaj9/17/2023
good spotting josh!
Bbrody1929/17/2023
Bbharadwaj9/17/2023
ahh yess! haha I don't know what can I do with it though πŸ˜„
thank you for being patient and helping it through @Brody !
the multi region feature got released just last week! lucky me!
Bbrody1929/17/2023
it makes you look cool
Bbharadwaj9/17/2023
loving the railway app a lot, it's so easy to deploy
Bbrody1929/17/2023
definitely
Bbharadwaj9/17/2023
thank you all! can I mark this post as solved?
Bbrody1929/17/2023
already marked as solved
Bbharadwaj9/17/2023
haha Absolutely! I feel like I learnt a lot things new today already!
super! πŸ˜„
have a good rest of the day @Brody its 4 am in India an all nighter for me! XD
Bbrody1929/17/2023
have a good rest!

Looking for more? Join the community!

R
Railway

βœ‹ο½œhelp

Join Server
Recommended Posts
Deploying Rust tries to copy binaries that don't exist.I'm not using my own nixpacks.toml, and railway is attempting to copy binaries that it doesn't need Cron skipingSo my Cron Schedule keeps skipping every time?Request to free up custom domainMy project id : 5df73bd5-7d04-40dd-9e57-97f1cdd89a60 Can u pls delete the given custom domain, it sPR PreviewsHi everyone. Is it possible to setup PR previews with it's own set of environment variables?Looking for way to run LibreTranslate as a service on railwayI'm looking for a way to run https://libretranslate.com on my railway instance. Ideally it would beRTT to nearby datacenter has gone way up in the past few daysRegions have been amazing and are super helpful for our use case. We host our database in AWS us-easPublishing .net 7 app - project file not foundHi, I'm new in railway and i'm faced with file structure problem. I heared that way to publish is sIssue with staging: The value needs to be expressed as a valid JSON string.i'm trying to make a dev and product env's, but now i created a service on the dev env and trying toIssue with staging: The value needs to be expressed as a valid JSON string.i'm trying to make a dev and product env's, but now i created a service on the dev env and trying toUse Volume with grafana will permission deniedI was configed volume and data path, but when i start my grafana, it will crash. This is log: Error:if i disconect an account of github ?whats going on with the repository are linking with this account ? fb928ae2-62f0-4f8f-be68-9f7902efCommunication between projects without requestsHey everyone, a question. Is it possible to establish communication between projects? For example, Ihow to setup webhooks?Hey guys I'm looking for how to setup a deploy webhook similar to vercel for my website with sanity.Template services in forked environment not deployingHi! When I create a new environment from the base one the two services, that I created from a templaHow can I update the file permissions inside a railway development instance?I receive this error: "PermissionError: [Errno 13] Permission denied: './src/engines/komodo-14/LinudockerIs it possible to use commands or access through a terminal a docker image? I have a Docker image ofDeployment failingI am trying to deploy some updates to my app and I am getting errors during the build process. DockPayload CMS app 500 errorURL: https://edit.gravybo.at/ ID: 9c654a5e-96b8-42bd-a2a0-d82a9e0b8d11 App builds/runs locally, howConfiguring Redis TemplateHi, I was wondering how we can configure the new Redis from the templates. In particular setting theNew deployments maxing out RAM?I have no idea why this started happening, but any new deployments made for one of my services now m