Skip to content

[bug]: Events/Election fetching from Strapi Cloud can sometimes fail due to cold start #105

@henrylee746

Description

@henrylee746

What happened?

Usually loads for 15-20 seconds
Image

Fails as such:
Image

It does succeed on fetching once the server starts up. but spins back down after a couple minutes of inactivity.

Solutions:

Vercel Cron Job monitor a route during every X minutes

Tradeoffs

  • Using Vercel resources to compensate for Strapi's limitations, bit of an awkward workaround
  • Easy config (I think it wouldn't take much setup) without having to upgrade Strapi Cloud

JOCA admins accept to upgrading to a paid tier on Strapi

Tradeoffs

  • No code changes whatsoever
  • Directly targets the root cause
  • Monthly payment overhead (although not sure how much of a budget JOCA has to measure this impact-wise)
  • It would be good to upgrade the Strapi plan anyways (from free to essential, 18/month):
  1. 20x more API requests/month (2.5k on the free plan can be a bit tight)
  2. 5x more asset storage/bandwidth
  3. 500 database entries to unlimited

There's also UptimeRobot - pings a URL every X minutes. Apparently free, another decent solution

My suggestion: If JOCA can handle the budget, upgrading is the clear solution. If not, a cron job will do

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions