I have a website on Magento 2 and when I try to access the website, it's really slow and it can take up to 2 minutes to charge a page. When I try to access the admin, either it's really slow like on the website or I get the error
504 Gateway Time-out
I don't know how to fix it. It seems to be related with varnish but I didn't find anything on the net, I couldn't find the files they talked about.
Thanks for your help
Edit: When I try to access my website, I immediately get the home page with every element on it, but it keeps loading for 30 seconds.
Best Answer
A few initial checks I would make.
Check your PHP version is correct, Magento supports PHP 7.4.0.
See: https://devdocs.magento.com/guides/v2.4/install-gde/prereq/php-settings.html#check-php-settings
Either via Admin > System > (Tools) Cache Management,
or via CLI: