Environment:
Network Solutions VPS running Apache
MODx 2.0.7
PHP 5.2.17
MySQL 5.1.55
Looking for ideas / best practices to tune performance, in addition to suggested upgrade to 2.0.8 by MODx support.
Other background info:
- Page loading seems sluggish (3-5 seconds) and sometimes even longer
- After a page loads, I can click and get an attachment like a PDF almost instantly, so assuming that's pulling the PDF off the web server, I suspect some front-end issues
- We had corrupt DB issue about a week ago and MODx support helped us find and fix it. I don't have any benchmark on the page load times I can point to for sure, but the site was faster (I think) pre-incident.
Pretty sure I am going to upgrade to at least 2.0.8, but curious if there are any other best practices for cache management or configuration settings I should consider.
Cheers all.
Home page loaded quickly for me, but the News page did take about 10 seconds.
Are you able to post the template used on that page, including any snippet calls used for loading in the article summaries?
Also, were you able to find out what caused the corrupted db?
Lucas - not a developer, just the site owner, but if by template you mean the template code for the home page, I have attached it as a .txt file.
I don't know if the template variable settings make a big difference or not.
Curious you say the home page loaded quickly. I am getting 3-4 seconds at least, sometimes more, and my remote sales staff gets the same, so it's not a bandwidth issue. I would really like the pages to load in 1-2 seconds if possible.
As far as the cause of the corrupted db, still a slight mystery. But what MODx support discovered was a recursive reference in the DB for a resource. Turns out the resource was a News (PR) post that somehow got saved as or overwrote the news archive folder that was it's parent - so you had a resource trying to be parent and child at the same time. 2 days before the site went down, the news archives just disappeared from the web site and the CMS resources. Then I guess the recursion got the best of the site since it was trying to resolve the news headline on the home page and the site and DB just gave up and went down.
MODx moved the resource to the root and fixed the problem and that got the site up again, and I have since reorganized the resources.
But that's when we noted site sluggishness, especially the news and blog pages.
Along the way, in doing our own troubleshooting, my CTO did an install of MODx 2.0.7 on top of the existing one (didn't fix the problem). Wonder if that affected any cache or other settings, or if any 3rd party packages were not completely reinstalled.
[ed. note: ggillen last edited this post 14 years, 8 months ago.]
Thanks or the suggestion Lucas. I will give it a shot.
If it does speed things up but prevent refreshing of things like the PR headline, one solution would be to clear the cache on each occasion that we post a new Press Release, coorect? If this is coordinated with my PR guy and only happens occasionally, that should work.
Unless there is a setting somewhere to automatically clear the cache periodically?
I'll let you know how the speed changes now that I have some benchmarks.
Thanks.
The cache could be partially refreshed using a plugin, but yes, manually clearing it after news posts would be the simplest solution without requiring any development.
I would have a look in the 'top' chunk as there may also be an uncached call to the Wayfinder snippet which has been known to slow things down for some implementations.