Skip to content

API call cold start takes too long (CP included) #1312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vitalijalbu opened this issue Feb 19, 2025 · 6 comments
Open

API call cold start takes too long (CP included) #1312

vitalijalbu opened this issue Feb 19, 2025 · 6 comments

Comments

@vitalijalbu
Copy link

vitalijalbu commented Feb 19, 2025

Hi guys, I wanted to do some stress testing with statamic (to see how much data it can hold):
here's my playground API url, at cold start (meaning after some hours) it takes so much time... but after the first call it's ok...anyone knows the reason?
CP also is so slow (147k records I have, ok... but the first 50 records of the table must be faster that 1+ minute I suppose)
I use eloquent driver + mysql + siteground (which is one of the faster and best hosting)

https://toovoz.craftus.co/api/collections/items/entries

I attach screenshots before and aftrer

@vitalijalbu
Copy link
Author

1st calll

Image

2nd call

Image

@duncanmcclean
Copy link
Member

duncanmcclean commented Feb 19, 2025

here's my playground API url, at cold start (meaning after some hours) it takes so much time... but after the first call it's ok...anyone knows the reason?

By default, REST API responses are cached for an hour.

@vitalijalbu
Copy link
Author

### CP 1st call

Image

### CP 2nd call

Image

@vitalijalbu
Copy link
Author

here's my playground API url, at cold start (meaning after some hours) it takes so much time... but after the first call it's ok...anyone knows the reason?

By default, REST API responses are cached for an hour.

yeah ok, but on the cp panel it takes soo long to render table... schema blueprint is simple btw

@duncanmcclean
Copy link
Member

duncanmcclean commented Feb 19, 2025

You mentioned you're using Siteground - are you using their shared hosting or are you using a VPS?

There are large sites running on Statamic, with the Eloquent Driver without any major performance issues. It's possible it could be a server setup issue.

@vitalijalbu
Copy link
Author

You mentioned you're using Siteground - are you using their shared hosting or are you using a VPS?

shared hosting, siteground has 30% php speed than other hostings...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants