#Page load times too slow

11 messages · Page 1 of 1 (latest)

median pier
#

I've added an endpoint to my site which is receiving requests multiple times a second and then updating the database. The problem is that it's massively slowing down page load times - some times taking more than 50 seconds to load.

I've changed the runtime to V2 and increased the replicas to 4 but it's not made much difference. I'm currently using the Hobby plan and wonder if I need to upgrade to the Pro plan or just offload the database updates to Redis or another server entirely.

Any help would be much appreciated. Thanks!

vapid cloakBOT
#

Project ID: N/A

median pier
#

N/A

wind leaf
#

Do you know where this is delay is comming from?
Is it purely the latency between you and the app?
or are there queries or other things that could slow down your app?

cosmic rampart
#

I agree, you are going to need more telementary, this is unlikely to be a hardware limitation, and more of a code bottleneck

wind leaf
#

easiest way is to add a /ping endpoint to your application (without it executing any query) and just resolving the call directly
thats the easiest way to know if railway is slow

mellow escarpBOT
median pier
#

Thanks for the suggestions.

#

I've managed to restructure the code so the number of api calls and database hits have been drastically reduced so it isn't causing any issues anymore.

#

I was just under the impression that the server would be able handle it as there were only around 2-3 requests per second coming in

cosmic rampart
#

it can, the issue was a code bottleneck, you where likely doing blocking tasks thus drastically lowering your throughput