WPIntell

Source evidence

Memory limit exhausted in PHP 8.x

wp-Typography · support · 2023-09-05T14:48:00+00:00

mixedsentiment
highseverity
0.95relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

2 / 24 rows with source links

8.3% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

22 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
WanDal resolved
Hello When we upgrade our website from PHP 7.4 to PHP 8.x, after some time we get the PHP error message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in \wp-content\plugins\wp-typography\vendor-scoped\mundschenk-at\wp-data-storage\src\class-transients.php on line 116 Once we clear the cache of wp-Typography, the page works again for some time. In the post https://wordpress.org/support/topic/incompatibility-errorcode-500 I read that this could be due to too many plugins. Well, our website actually uses quite a lot of plugins. However, they are all needed and I can’t just disable them. I wonder why the problem only occurs with PHP 8.x. Can you explain this to me? And do you have a tip on how I can further analyze the actual problem. After all, the extension won’t take up so much memory for no reason. Many thanks WanDal Hi @dawasi ! wp-Typography needs a certain amount of memory because it uses a DOM parser. Other plugins also need their slice of RAM – more plugins, more RAM. Memory management behavior can change between PHP versions. So there is really no problem useful fix except to increase your PHP memory_limit setting (while reasonable, 256 MB might not be enough with a lot of plugins or large posts). Which plugin, if any, triggers an OOM condition depends on plugin load order and the specific content the request tried to access. While you theoretically can try to profile memory usage using something like Blackfire, it will not be worth your while. Hi @pputzer Thank you very much for your explanations. Accordingly, I have not performed any further analyses and have increased the memory limit. So far, no more errors have occurred.

Comments

2 shown
pepe 2023-09-06T20:56:00+00:00

Hi @dawasi ! wp-Typography needs a certain amount of memory because it uses a DOM parser. Other plugins also need their slice of RAM – more plugins, more RAM. Memory management behavior can change between PHP versions. So there is really no problem useful fix except to increase your PHP memory_limit setting (while reasonable, 256 MB might not be enough with a lot of plugins or large posts). Which plugin, if any, triggers an OOM condition depends on plugin load order and the specific content the request tried to access. While you theoretically can try to profile memory usage using something like Blackfire, it will not be worth your while.

WanDal 2023-09-12T11:54:00+00:00

Hi @pputzer Thank you very much for your explanations. Accordingly, I have not performed any further analyses and have increased the memory limit. So far, no more errors have occurred.