I have about 2000 visitors in one day.
Piwik worked correctly for one week.
But now, I get the following error, when my crontab tries to launch the update :
Yes you right
512M is the correct syntax.
However, i still get the first error now :
Error in the last Piwik archive.php run:
2 total errors during this script execution, please investigate and try and fix these errors. First error was: Got invalid response from API request: http://www.mywebsite.fr/analytics/index.php?module=API&method=VisitsSummary.getVisits&idSite=1&period=month&date=last2&format=php&token_auth=1c99eca7c6be7c9d5388f09bb9eb2996&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file.
I set at 1024M now.
I will check if everything is ok.
Friendly reminder: don’t edit global.ini.php. If you directly edit the file, you will lose your changes when you upgrade Matomo. If there is no config/config.ini.php (usually found in the top directory, the folder named matomo) you can make a new empty file, and put [General] at the top of the file.
These are a minimum. Changing them can help a bit but not dramatically. The maxi`mum limit is the most important thing and it is set elsewhere: in the php config files, on your operating system.
So yes, if you want, you can set them to -1. It’s not expected to improve performance, since PHP is a high level language and will use both the minimum and maximum in the most efficient way.
More important is to locate the php.ini file used by your OS and set the following values:
memory_limit = 2G
max_execution_time = 0
log_errors = On
display_errors=Off