Intermitent internal server errors

I’ve got a Modx site that is intermittently getting Internal server errors and/or parts of the manager are not loading e.g. the resource tree or file list. Occasionally, all of the manager won’t load except for the top menu. Often a refresh will restore the manager and it works fine until it happens again. When not seeing this behavior all manager functions are working. This is happening frequently, perhaps every 5 or 6 manager interactions.

My client just told me about this and mentioned they’ve had some issue with it for a while, so I don’t know when this started but the error log started filling up on 10-31-22. I don’t know how far back this error log goes so I don’t if that’s when it really started.

Modx: 2.8.1 - I don’t want to upgrade until this is fixed because I’m afraid I’ll get a server error mid-upgrade.
PHP: 7.2.9 - This was at 7.4 but I downgraded it to see if this changed anything. It didn’t
Platform Type: Debian
MySQL Version: 5.6.32

This site has been running for many years on this host/server with few problems.

I’m seeing these errors in the server error log.

20221101T072532: xxxxxxxx.org - This website is for sale! - xxxxxxxx Resources and Information.
PHP Notice: Trying to access array offset on value of type bool in /hermes/xxxxxxxx/xxxxxxxx/b961/ipg.xxxxxxxx/core/xpdo/om/xpdoobject.class.php on line 264
PHP Notice: Trying to access array offset on value of type bool in /hermes/xxxxxxxx/xxxxxxxx/b961/ipg.xxxxxxxx/core/xpdo/om/xpdoobject.class.php on line 264
PHP Fatal error: Uncaught Error: Call to a member function execute() on bool in /hermes/xxxxxxxx/xxxxxxxx/b961/ipg.xxxxxxxx/core/compon

And these in the Modx error log.

|11.11.2022|16:58:17|ERROR|/xxxxxxxx/xxxxxxxx/xxxxxxxx/b961/ipg.xxxxxxxx/core/components/bigbrother/model/bigbrother/bigbrother.class.php|398|
|PHP warning: count(): Parameter must be an array or an object that implements Countable|

That last PHP Fatal Error sounds like you may be having database server issues. It may be overloaded or just plain unstable.

Wiping the modx_sessions table can sometimes help with stability issues, that tends to be a big table. If your server isn’t automatically cleaning up sessions, that can over time become problematic.

Those notices I believe have been resolved in 2.8.4.

I just cleared the sessions table. At first it seemed to have solved the problem. I could click all around the manager with a problem. Then I opened a resource, but was unable to close it with the close button. I tried it on several other resources, can’t close with the button. The view and save buttons work just fine. This may have been happening all along and I just never tried this. Not sure.

Then as I was trying a few more resources I got another internal server error. I refreshed and the manager came right back.

I checked the server error log but I don’t see any new errors. In fact, I realized the most recent error message is from 11-1-22 assuming this is the date stamp: 20221101T072532 shown in the errors I posted above.

Does this mean I have to try to convince the hosting tech support that they have a DB server problem (I’ve never had shared hosting tech support admit there is a problem with their server. . . )

I have manually cleared the modx cache. I’ve also reset php back to 7.4

Other suggestions?

Is your version of BigBrother up-to-date? I see it mentioned in your error log.

Bob, it is not the latest version because the client hasn’t yet switched over to new version of analytics.

I did see a post about BigBrother and server errors, but it was from 10 years ago and the errors turned out to have nothing to do with BigBrother. I just wondered about that error message.