We have a very high traffic site and are experiencing issues during archiving. We have traced the problem down to a request made by the archive command
When we put this command into the browser, it takes about 40s to complete, but it does complete and the data is properly archived. When initiated from the archive ./console --force-idsites=XXXX command it returns an empty response.
Questions:
Does anyone know why these execution contexts would differ in their limitations? It seems to me that a CLI context would be more permissive in terms of memory limits and execution timeouts.
It looks like the console command actually makes an HTTP request (it outputs the URL above), which would invoke the php.ini related to apache, not the cli. Does anyone know which php.ini is involved?
I wanted to share some debugging information for future googler’s. This surfaced again, so we ran the console archive command again with full verbose output.
./console core:archive --force-idsites=1234 -vvv
We saw this command
DEBUG [2018-08-30 12:06:56] 15515 /usr/bin/php5 -q /var/www/html/console climulti:request -q --piwik-domain=’’ --superuser ‘module=API&method=API.get&idSite=1234&period=day&date=last52&format=php&trigger=archivephp&pid=’ > /var/www/html/tmp/climulti/.output 2>&1 &
ERROR [2018-08-30 12:07:06] 15515 Got invalid response from API request: ?module=API&method=API.get&idSite=1228&period=day&date=last52&format=php&trigger=archivephp. The response was empty. This usually means a server error.
I installed xdebug and ran this command using the exact output from the archive command
By the way, in this situation there will be no errors in the log and there are no memory_limit issues in this case, so the default command output is a bit misleading here.