No Code Attached Yet Information Required bug
avatar eddiekonczal
eddiekonczal
22 Mar 2024

Steps to reproduce the issue

Enable the "Content - Email Cloaking" plugin

Expected result

The "Content - Email Cloaking" plugin should remain enabled

Actual result

On some websites, the "Content - Email Cloaking" plugin runs out of memory and becomes disabled. These errors are seen in our logs:

Jan 27 23:01:28 0 2024-01-27T23: 01:28.372429-05:00 lamp204 httpd.worker[1125427]: - httpd.worker: [warn] [client 43.133.56.97] mod_fcgid: stderr: PHP Fatal error: Out of memory (allocated 8388608) (tried to allocate 131072 bytes) in /mnt/data/vhosts/casite-1407156.cloudaccess.net/httpdocs/plugins/content/emailcloak/src/Extension/EmailCloak.php on line 455
Jan 27 23:01:34 0 2024-01-27T23: 01:34.748011-05:00 lamp204 httpd.worker[1125430]: - httpd.worker: [warn] [client 43.133.56.97] mod_fcgid: stderr: PHP Fatal error: Out of memory (allocated 8388608) (tried to allocate 131072 bytes) in /mnt/data/vhosts/casite-1407156.cloudaccess.net/httpdocs/plugins/content/emailcloak/src/Extension/EmailCloak.php on line 455

System information (as much as possible)

PHP Built On | Linux lamp204.cloudaccess.net 3.10.0-962.3.2.lve1.5.65.el6h.x86_64 #1 SMP Wed Jan 19 11:33:04 UTC 2022 x86_64
Database Type mysql 5.7.44-cll-lve
Database Collation utf8mb4_general_ci
Database Connection Collation utf8mb4_general_ci
Database Connection Encryption None
Database Server Supports Connection Encryption Yes
PHP Version 8.1.27
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 4.4.3 Stable [ Pamoja ] 20-February-2024 16:00 GMT

Additional comments

avatar eddiekonczal eddiekonczal - open - 22 Mar 2024
avatar joomla-cms-bot joomla-cms-bot - change - 22 Mar 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Mar 2024
avatar brianteeman
brianteeman - comment - 22 Mar 2024

the php put of memory error is probably the most unhelpful and confusing error message as it is usually not telling you what is causing the memory usage it is only telling you what was the last thing it fell over on.

avatar Hackwar
Hackwar - comment - 22 Mar 2024

What do you mean with "disabled"? Do you mean the error messages or is the plugin actually somehow automatically set to unpublished?

In any case, your error message says that you only have 8MB of memory for your PHP process available and that is simply way to little. You will need maybe 64MB and I would say that commonly you would have that set to 256MB on a normal host. The problem is not the emailcloak plugin, but the hosting with way to little memory.

avatar Hackwar Hackwar - change - 22 Mar 2024
Labels Added: Information Required
avatar Hackwar Hackwar - labeled - 22 Mar 2024
avatar eddiekonczal
eddiekonczal - comment - 22 Mar 2024

The plugin actually gets automatically disabled.

avatar brianteeman
brianteeman - comment - 22 Mar 2024

I cant see how a php memory issue can change a value in a mysql database

avatar Hackwar
Hackwar - comment - 22 Mar 2024

Indeed, disabling the plugin is not a core feature of Joomla...

avatar Hackwar Hackwar - change - 24 Mar 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 24 Mar 2024
avatar richard67
richard67 - comment - 28 Mar 2024

Indeed, disabling the plugin is not a core feature of Joomla...

@Hackwar Are you sure? This page tells that plugins are automatically disabled if they throw an error in their initialization: https://docs.joomla.org/Why_are_my_plugins_automatically_disabling

avatar Hackwar
Hackwar - comment - 28 Mar 2024

Yes, I am sure, since that code is not in the PluginHelper and it was the code which was removed again in 1.5.18. Or in other words: This was introduced in 1.5.17 and removed in 1.5.18 again, since it was completely impractical.

avatar Hackwar Hackwar - change - 30 Mar 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-03-30 15:59:23
Closed_By Hackwar
avatar Hackwar Hackwar - close - 30 Mar 2024
avatar Hackwar
Hackwar - comment - 30 Mar 2024

I've looked into this again and we definitely don't have a mechanism to disable plugins on failure. Since your original issue is pretty much entirely due to not enough memory on your host, I'm closing this issue.

Add a Comment

Login with GitHub to post a comment