@MasaGon opened this Issue on January 19th 2020

When I update matomo from 3.13.0 to 3.13.1, --php-cli-options seems not to be valid with console core:archive.

sudo -u nginx ./console core:archive --force-all-websites --force-all-periods=315576000 --force-date-last-n=1000 --url='http://example.com' --php-cli-options="-d memory_limit=8G"

....

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 16384 bytes) in /var/www/matomo/libs/Zend/Db/Statement/Pdo.php on line 228

@tsteur commented on January 20th 2020 Member

Looking at the code PHP CLI options can only work if your system can use the CLI archiving. It looks like it is falling back to Web archiving eg because some PHP methods are disabled, you are using windows, we couldn't find a valid PHP binary, etc.

Can you to Admin => Diagnostics: System Check and see what it finds about Archive Cron?

@MasaGon commented on January 29th 2020

Currently it sais,

 Managing processes via CLI: not supported (optional)

How can I fix that?

@tsteur commented on January 29th 2020 Member

It's hard to say. There are many reasons why it wouldn't use CLI.

Eg if

  • You are on windows
  • If certain php methods are disabled like shell_exec or getmypid
  • If PHP CGI is used and we couldn't find a regular PHP binary automatically
  • If we can't properly execute ps or awk
  • It doesn't work on synology
  • Proc FS needs to be mounted

I recommend - if possible - to check above things.
Otherwise you'll need to increase the memory on the webserver.

@MasaGon commented on January 30th 2020

Regarding the reason why matomo sais CLI not supported, I will investigate later. But actually I'm using CLI for archiving logs with cron. I use ubuntu.

@MasaGon commented on January 31st 2020

I'm Sorry. I use RHEL 7.7 instead of ubuntu.

This Issue was closed on January 29th 2020
Powered by GitHub Issue Mirror