Skip to content

Magento 2.4.2 slow with multiple stores

Good morning people!
I come to ask for help with magento 2 configured for multiple stores, my problem is that when I have one or two stores it works normally, but our database has more than 20 stores registered and this causes a very long delay for the first load. Once the store is accessed it gets faster!

I’ve done several tests, increased the capacity of all services and had no improvements, database and services are optimized. We use instances on AWS EC2, AWS RDS database, AWS CLOUDFRONT CDN and AWS ELASTICACHE REDIS.

When you have one or two stores it takes about 1-2 seconds for the first load, but with all our stores it takes about 15 seconds for the first load.

Does anyone have a solution to speed up this initial loading?
We are using Magento 2.4.2 community.