Recently we began seeing the āThere was an error processing your request, please try again at a later timeā error message (at the bottom it also says, āIf this error persists, please have your administrator disable Ajax for this moduleā) and Iām struggling to make any sense of it. I have two sites both running SuiteCRM. Iāll call them Sites A and B. They were both at 7.14.3 and were on two different servers, Site A still running on PHP 7.4, Site B on PHP 8.1. I moved Site A to the PHP 8.1 server and sometime around then the error started showing up. If it only happened on Site A, I might think it had to do with the move but itās happening on both sites, including Site B, which wasnāt changed. I noticed that there was an security update available and upgraded both to 7.14.4 and also ran ācomposer update --no-devā and while that was a good thing to do, it made no obvious difference. I even deleted the vendor directory and ran ācomposer install --no-devā. That seemed to fix things temporarily but then the error started to appear again. Likewise, running Quick Repair and Rebuild seems to fix things for a little while but then the error returns.
One very frustrating thing is that the errors seem to come and go. It will work for a while, then the error will show up. Later, the error goes away and things are working again. In addition to the error message, some modules are not always listed in the menu or some tabs for modules are missing. Then later both the modules are back in the menu and all the tabs will be there again. Itās very hard to diagnose, as the problem comes and goes.
In the log files I see things like this:
[Fri Aug 23 14:53:10.058274 2024] [proxy_fcgi:error] [pid 3894:tid 140066064168704] [client 10.17.10.77:53944] AH01071: Got error āPHP message: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /websites/SITE-B/www/cache/smarty/templates_c/fc6169268c1880b89bbc702d08172a989abbd49c_0.file.DetailView.tpl.php:1012\nStack trace:\n#0 /websites/SITE-B/www/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_66c62db4ca7ea8_29868753()\n#1 /websites/SITE-B/www/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#2 /websites/SITE-B/www/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render()\n#3 /websites/SITE-B/www/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render()\n#4 /websites/SITE-B/www/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute()\n#5 /websites/SITE-B/www/include/Sugar_Smarty.php(150): Smarty_Internal_Tā¦ā, referer: https://SITE-B.EXAMPLE.com/index.php?action=ajaxui
Iāve tried deleting vendor/smarty, running ācomposer install --no-devā again (and then changing the ownership and permissions back to what they need to be). Once again, that seems to fix it for a little while but then things stop working again. Itās very frustrating and I really donāt know what to do. The suitecrm.log file doesnāt have anything obvious, either.
To be honest, it feel like a resource issue on the web server. The server had 8GB of RAM and I doubled that, to see if it made any difference. It did not. I have the php memory_limit set to 256M, which seems like itās enough for pretty much anything (and itās been that way for a few years without this issue showing up until now). Iāve tried changing the php-fpm max_children and related settings but nothing seems to help.
Any suggestions or pointers would be greatly appreciated.
Note that when running composer, I also get a long list of notices about classes that do ānot comply with psr-4 autoloading standardā which is a little disconcerting, but I donāt know if itās relevant or not.
Any suggestions would be very welcome, as Iām somewhat at sea.
ā Henry Hartley