matomo-org / matomo-org/docker
Archiving Maximum Memory Incorrect
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 1k
- Forks
- 384
- PR merge metrics
- No merged PRs in 30d
Description
When archiving:
INFO [2020-12-30 22:00:01] 15 Downloading https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&suffix=tar.gz&license_key=<REDACTED> to /var/www/html/tmp/latest/GeoIP2-City.mmdb.tar.gz.download.
INFO [2020-12-30 22:00:05] 15 GeoIP2AutoUpdater: successfully downloaded 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&suffix=tar.gz&license_key=<REDACTED>'
ERROR [2020-12-30 22:00:06] 15 Fatal error encountered: /var/www/html/vendor/pear/archive_tar/Archive/Tar.php(1903): Allowed memory size of 134217728 bytes exhausted (tried to allocate 65011744 bytes)
on /var/www/html/vendor/pear/archive_tar/Archive/Tar.php(1903)
Matomo encountered an error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65011744 bytes) (which lead to: Error: array (
'type' => 1,
'message' => 'Allowed memory size of 134217728 bytes exhausted (tried to allocate 65011744 bytes)',
'file' => '/var/www/html/vendor/pear/archive_tar/Archive/Tar.php',
'line' => 1903,
'backtrace' => ' on /var/www/html/vendor/pear/archive_tar/Archive/Tar.php(1903)
',
))
So it's limiting it to 128 MiB, but that doesn't make sense to me since in config/global.ini.php we have:
; Minimum advised memory limit in Mb in php.ini file (see memory_limit value)
; Set to "-1" to always use the configured memory_limit value in php.ini file.
minimum_memory_limit = 128
; Minimum memory limit in Mb enforced when archived via ./console core:archive
; Set to "-1" to always use the configured memory_limit value in php.ini file.
minimum_memory_limit_when_archiving = 768
I do not have anything related to memory in config/config.ini.php. So it should be limiting it to 768 MiB in this scenario, right?
My cron command:
/usr/bin/docker exec --user www-data matomo-01 /usr/local/bin/php /var/www/html/console core:archive --url=https://<REDACTED>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with config/global.ini.php and the console core:archive entry point, then compare the configured archive memory value with the 128 MiB limit shown in the Archive/Tar.php error. Reproduce using the supplied Docker cron command and verify that archiving applies the expected memory limit without exhausting it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, php
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100