Having Speed Issues

Discuss Magento related issues here.

My development team is creating an e-commerce website on the Magento Platform, and they’re having speed issues with the server.

It was working well last week when they started on building the website. However, today it keeps giving them the loading the site message with the 502 Gateway error.

Does anybody know if this is a common issue with Cloudways? Any recommendation on how to resolve this?
Is it a host issue?

My current server:
Processor 2 Core
Storage 80GB
Bandwidth 4TB

Website is not Live yet, still in development.

Any useful information would be highly appreciated, thanks!


Hi @devraj1025

Which Magento version are you using? M1 or M2?

Also, please check with your development team. If the site was working well before, what changes have they made or installed any Magento extension that causes 502 Error.

A 502 error is caused due to timeout of PHP request. To prevent this error, you need to adjust some server settings, i.e. you can increase Execution Limit for the server.

Check out this KB, I hope this can help you:


Also, do not forget to check your application side as well. Some broken scripts can also be the cause of this issue!

Magento regularly releases new updates, with every update adding to the platform’s optimization. Therefore, the first and the most basic tip for improving Magento optimization is to update to the latest version.

Enable Magento 2 Varnish Cache

Click on System under the Advanced tab, expand the Full Page Cache section and change the Caching Application field to Varnish Caching.

Magento uses precious server resources for accessing the details of categories and products from the native database. As a result, the store starts to slow down due to the lack of resources.

To resolve this problem, enable Flat Catalog that would reduce the load on the database by creating a new table with all the necessary record of product and catalog is present.

For this:

Step 1) Go to the admin panel of your Magento store, and navigate to Store → Configuration.

Step 2) Click Catalog under the Catalog tab.

Step 3) Expand the Storefront section, and change the fields Use Flat Catalog Category and Use Flat Catalog Product to Yes.