Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--php-cli-options on console core:archive seems not to be valid #15416

Closed
MasaGon opened this issue Jan 19, 2020 · 5 comments
Closed

--php-cli-options on console core:archive seems not to be valid #15416

MasaGon opened this issue Jan 19, 2020 · 5 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@MasaGon
Copy link

MasaGon commented Jan 19, 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
Copy link
Member

tsteur commented Jan 20, 2020

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
Copy link
Author

MasaGon commented Jan 29, 2020

Currently it sais,

 Managing processes via CLI: not supported (optional)

How can I fix that?

@tsteur
Copy link
Member

tsteur commented Jan 29, 2020

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.

@tsteur tsteur closed this as completed Jan 29, 2020
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Jan 29, 2020
@MasaGon
Copy link
Author

MasaGon commented Jan 30, 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
Copy link
Author

MasaGon commented Jan 31, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants