Why do I get an error on update xml file ?
You just clicked the little orange round arrow icon to regenerate your XML feed, and after some time (usually 30 seconds), you get the following error :
This is due to the execution time and memory limits defined in PHP code of your server configuration ("max_execution_time" and "memory_limit" parameters).
To solve this problem, without having to modify the PHP, you can try to change the number of products per cycle value to process. To do that, go to "Basic settings" --> "Number of products per cycle" :
You need to experiment with this value and find what works the best according to your server's performance.
Normally, if you are hosted on a dedicated server with many products, it will be preferable to increase this value. Indeed, as your server is dedicated only to your website, it will better support to process a large products number per cycle rather than doing many cycles (which uses a lot of memory and so increases the execution time of each cycle). You can for example start to match this value with your catalog products number so that your server makes only one cycle. If it works, decrease this value until you get again the error. Then, opt for an intermediary value, which will be the best compromise between performance and security.
If whatever the number of products per cycle, you still get the error, you'll need to increase the "max_execution_time" and / or "memory_limit" directives in the server configuration.
For example, you can put 1 hour for the execution time (max_execution_time=3600) and 1 GB for the memory allowed (memory_limit=1024M). This is just an example and you can of course adjust these values in order to get the best compromise. The values indicated here are quite high, you can start with those and then decrease until you reach the lowest acceptable values.
However, if you are on shared hosting, you logically cannot override (modify) freely the server configuration. So start to decrease the value of the number of products per cycle in order to decrease the execution time. Go down to 100, and then to 50, 25 etc... Until you no longer get the error. Then, increase back up until you get the error again, and leave it at the last value that works.
You can also modify the configuration file of your PrestaShop installation:
Open the /config/config.inc.php file in PrestaShop by adding these following lines :
@ini_set('max_execution_time', 3600); // 1 hour
@ini_set('memory_limit', '1024M'); // 1 gigabyte
Or, you can also ask your web host about modifying the values of the PHP directive "max_execution_time" and / or "memory_limit", directly on the server.
Other FAQs in this category
- Why were the XML files not created ?
- Why are my product feeds generating errors ?
- How can I check that my data is updated?
- How to check which prices are sent to Google?
- How does the diagnostic tool work ?
- Why have some of my products not been exported in the feed ?
- How to check if my specific prices are correctly exported?