I offer an explanation for the bizarre MODX Revo Manager behaviors that many of us are seeing. These include the randomly appearing "Syntax Error: Internal Server Error" message, incomplete rendering of the item trees at the dashboard's left side, and (rarely) rendering the Manager page seemingly without using its style sheet.
I moved a 2.2.5 installation with about 1800 resources from hosting service
A, where I did not encounter these problems, to hosting service
B, where I saw them every few minutes. (The hosting service names are disguised to protect the innocent). Note well the fundamental difference between the services.
Service A is a cPanel conventional shared machine. Service B is a cPanel shared cloud server.
Of course Service B tech support considered my trouble report to be merely the confused ravings of a nonsensical mind. So I backed up my site and ported it to my XAMPP local development machine (where the site exhibited none of the above-described problems). Then I installed MODX 2.2.7-pl using B's Softaculous service, so that B would agree that I was not breaking anything.
Mirabile dictu! That brand-new, virgin (no resources or add-ons) Revo installation exhibited the same problems.
A diligent tech support guy who had struggled over this with me noted something in the server's log: The memory limiter was kicking in. The Revo Manager's rendering caused allocation of a gigabyte of VM, whereupon the server denied further allocation and so caused threads to fail. The allocation was transient, less than a second long, but that was enough to cause trouble. The ugly workaround is clearing the "Syntax error" and/or reloading the page.
So my tech support friend boosted my account's physical memory limit to 512MB and virtual memory to a whopping two GB! The problems became infrequent but did not entirely disappear. The limited cPanel log available to me showed VM pegging at the full two GB occasionally.
This is OK for my current use case, which is a non-commercial, non-critical Web site for a non-profit organization. It's not so attractive in general, however.
What's going on here? I suspect that a Revo "feature" is in play: Everything that can run asynchronously and in parallel is doing so. The result is a responsive UI, but only if ones server can handle the high transient memory demand. Maybe there is a good, old-fashioned sparse allocation problem in the mix, too.
Since the MODX Manager is an example of the programming style that the underlying framework encourages (i.e., as much parallel, asynchronous processing as possible thrown at an interpreted, object-oriented language), the problem will continue to pop up. Cloud-based hosting, which is on the ascent for good economic reason, seems to have trouble with high transient memory allocation. Looks like a collision course.
Some of the memory problems reported in this forum were found to be looping memory leaks and resolved accordingly. That is not the case with the above described problem.
Service B advertises MODX suitability and expertise on
http://modx.com/partners/hosting-saas/ . That's how I found them and why I pre-paid for three years of hosting with them. I sure hope it works out alright.
So, is this a bug report or a feature report?
===============
Update: The problem reported above seemed to have disappeared. (But it really had not. Keep reading.) I was unsure whether the hosting service had made some change or if recent version 2.2.7 -> 2.2.8 site upgrade had made a difference. For whatever the reason, the resource log showed that the Manager was no longer pegging virtual memory at my hosting service's two GB limit, and I was not encountering the bizarre Revo Manager behaviors.
Fantastic! So I went a step farther and turned on "Use Compressed CSS" and "Use Compressed JavaScript Libraries" once again. Sorry to report that the above-described behaviors re-appeared, and the resource log once again showed VM pegging at the two GB limit. Once again, the easiest way to induce the problem was to click on Package Management.
I found that enabling either of the compressions would induce the problems. Enabling both made problems more likely to happen. Disabling both, the problems disappeared. I found this entirely repeatable through several trials.
I'm glad for the improvement. Both Manager and site performance are quite snappy with the compressions disabled.
I feel that I can now expose the site's content editing person to the Manager, which has not been practical since I changed hosting services in January 2013. In turn, I'm encouraged to move another of my sites to this hosting service.
I'll continue to encourage my hosting service and the MODX team to collaborate on this. If & when the compression options no longer cause problems, I will report that along with the identity of my hosting service, who is a MODX advertiser. I want this to get better, better, better, not make waves that cause anyone problems.
[ed. note: halfnium last edited this post 10 years, 10 months ago.]