#API limitations

38 messages · Page 1 of 1 (latest)

void olive
#

Does Railway have an API call limit per service in the free account? I am running a cron job that involves a set of external API calls in a loop. However, it stops after executing 20 APIs. I have tested it locally, and it works fine. I would like to know the limitations of the Railway server.

Project ID: dd417141-599f-4431-bbf6-538cbc507f1d

stuck daggerBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

cyan axleBOT
#

Project ID: dd417141-599f-4431-bbf6-538cbc507f1d

fiery edge
#

railway has no limitations on the amount of calls your app can make to external services, you are likely being rate limited by the external service

void olive
#

Thank you I'll check with them.

fiery edge
#

what errors do you see on the 21st api call?

void olive
#

No errors, Just stop

#

I have added logs to monitor the pages.

1 page = 1 API call

fiery edge
#

you probably aren't logging errors when they occur

#

would you mind sharing what this external service is?

void olive
#

yes, I have missed to add logs to see errors. I'll add and test again.

CommerceLayer is the external service which I am using.

fiery edge
#

and why the need for making consecutive api calls?

void olive
#

They have a page limit, and we need to make multiple calls to retrieve all the data.

#

Ex: "meta": {
"record_count": 598,
"page_count": 24
},

fiery edge
#

they have that limit for a reason 😉

void olive
#

To get all 598 records, we have to call 24 times the API

fiery edge
#

they obviously dont appreciate you scanning through all the pages

#

and if they don't appreciate that kind of activity, railway wont appreciate that activity either

void olive
#

I my business requirement, I have to gather all the data per 5min. 🙂

#

This task is already working with Vercel, There I have to use multiple cron jobs to handle the load. Because they are having time limitations for long running services.

#

That's the reason to move with Railway

#

I'm not sure this time CommerceLayer side also having any issues, I'll talk with them also.

fiery edge
#

very good chance they just tell you to stop scraping their api

#

and thats kinda what im telling you too

void olive
#

Without looping their API, There is no way to get all the data.

#

That's the problem.

fiery edge
#

the problem is why do you need to scrape their api for the data every 5 minutes

void olive
#

I have to run 320 times to gather our production data 😅

fiery edge
#

it also sounds like you should be on the railway teams plan

void olive
#

Sorry, I can't explain the whole business logic in this thread. By the way, this is an API for extracting product details. When the product stock levels change from CommerceLayer side, we need to update our inventory every 5 minutes.

Because Our inventory DB is the middleman used to expose stock levels to external services.

#

Can you explain a bit why I need to move for Railway Teams plan?

fiery edge
#

please find a different way to gather this data without loops, you are abusing CommerceLayer's api and CommerceLayer could decide to ban railway cloud, thus blocking anyone else on railway from using CommerceLayer

fiery edge
void olive
#

yes, I'll talk with our team, But this is my research to find a suitable service for our problem.

fiery edge
#

in the interest of not getting external services to block railway, i will be asking the team to look into your use of the railway platform, no hard feelings

void olive
#

Okay, no problem. I'll contact you again further more assistant on this case.

sullen tangle
#

hey @void olive - whats the purpose? Research, what university?

void olive
#

I'm a kind of R&D developer, So, I'm researching a suitable service for the project.