Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes)

Hello,

I am getting the following error when viewing the ‘Behavior’ → ‘Pages’ tab. Specifically this happens when viewing a Period “Date Range”. The range to be a prior week (ex: From: Nov28, 2022 - To: Dec 4,2022). This does not happen when Selecting ‘day’, ‘week’, ‘month’ or ‘year’. It only happens when using the ‘date range’ period.



Fatal error : Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /srv/www/matomo/core/DataTable/Row.php on line 361
Matomo encountered an error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) (which lead to: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes))



Any information on what might be happening to where I should investigate would be appreciated.

*I would like to add one update.

I tried clearing the cache through the command using:

sudo ./console cache:clear
[sudo] password for admin-user:

Caches cleared

admin-user@matomo:/srv/www/matomo> sudo ./console cache:clear

Caches cleared


And now the error has changed just slightly:

Fatal error : Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /srv/www/matomo/core/Common.php on line 300
Matomo encountered an error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) (which lead to: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes))

What the logs are saying is that you don’t have enough PHP memory to do the range request. Ranges are not archived in advance and therefore needed to be archived temporarily when you are doing the range request, archiving takes PHP memory, and in this case, you don’t have enough. If you can, try to raise the PHP memory limit.

Thank you for breaking this down for me @Mikke_Schiren. Would you happen to know where to look for the file that I need to make this change?

Hi @Kelsey_jeh
See: