Apache and PHP settings which need changing for this to work.
- PHP will need the intl extension – php-intl.
- PHP will need the dom extension – php-dom package.
- max_execution_time: 30 seconds isn’t log enough in the admin interface which doesn’t have caching
- max_input_time: this will mostly catch you out for image uploads
- max_input_vars: Adding configurable products with many options will fail at the default of 1000 as magento doesn’t serialise large data sets
- memory_limit: Again the admin interface will need more
- post_max_size: Either scale down images first, or increase this to allow large uploads. Try to make memory_limit more than the post_max_size as while image uploads do not go directly into RAM, the image processing will generally need as much space as the uncompressed image you’ve just uploaded.
- upload_max_filesize: aim for 50% bigger than the photos you will be uploading.
- Adding configurable products with images often fails –
magento 2 processes images seperately for each virtual product it seems, so often fails to save a configurable product with many options and images.
Remember to restart the apache2 server after changing these settings. If you’re using php_fpm then you’ll need to restart that too.
Magento 2 Performance issues, relating to MySQL
Search caching for search terms with multiple layers of layered navigation and active search engines is a problem. Mitigations for this excessive database load:
Queries look like:
INSERT INTO `search_tmp_#RANDOMNUMBER#` SELECT `main_select` …
Use Robots.txt to reduce crawling of the layered navigation - either block it entirely or block crawling multiple queries in one get request
- turn off filterable in layered navigation for attributes where this is not necessary to avoid too many combinations
Speed up MySQL -
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
- Speed up MySQL by adding caching in RAM to cover more of the database
- Add indexing on critical tables in the query – catalog_product_index_eav
Magento message translation
- Please re-run Magento compile command
- cd $magento_root && /$PHP_PATH/php bin/magento setup:di:compile