PHP Memory Allocation error.

Issue #38 resolved
Andrew Haskell created an issue

Do I need to tune my PHP heap size if I keep getting the following error, or is it something else.

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 71526350 bytes) in /var/www/mailarc/model/search/message.php on line 30, referer: http://mailarc/search.php

** note the value never changes from 71526350 byes regardless of what search query throws the error.

It happens most frequently after either searching or sorting by size and using the > function if searching, or trying to sort the search results Largest to Smallest.

However has also happened on occasion on other search queries, or going between pages of a search result. But seems to happen most frequently when emails with largish attachments (+1 Mb) are in the search results.

Comments (2)

  1. Janos SUTO repo owner

    well, the php code in question is related to message verification. It creates an SHA256 digest, and compares it with the stored value in the metadata table.

    Currently the gui (or web ui) does this for every query for every message on the current search result page. And the bigger the message is the more memory php needs.

    I recommend you to set ENABLE_ON_THE_FLY_VERIFICATION to 0 in config.php, and let's see whether it improves performnance.

  2. Log in to comment