List of Articles in Category -- High CPU and I/O

Need help with the Administration of your Joomla! 2.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
Ellsinore
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Tue May 03, 2011 10:50 pm

List of Articles in Category -- High CPU and I/O

Post by Ellsinore » Wed Oct 15, 2014 7:11 pm

I have some complicated articles that have several components, including image galleries generated by Ari Sexy Lightbox, a lot of text, and some mysql queries. I'm trying to figure out how to get these more server friendly, but in my testing, I'm finding just generating the list of the articles in that category maxes out the hosting I/O allotment and the CPU resources.

I would expect there might be resource problems if the article title is actually clicked on for some of the bigger ones with lots of images in the image gallery -- which is where I started my search to try to figure out how to fix the problem -- but that doesn't seem to be the case. It's almost like Joomla! is processing all of these articles before they're even selected for viewing -- just to create the list.

Is that what's happening? If so, how do I stop it? If not, does anyone know what's actually going on? With more than a few articles published in that category, the generation of the list of the articles is *very* slow. But once the article itself is actually selected for viewing, it comes up pretty quickly and resource usage isn't an issue.

At this point, I've only got a dozen or so of these articles, and it's already a problem. Since there would be a lot more of them, I'd really like to find out what's causing the problem just generating the list before I continue.

Queasy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 155
Joined: Thu Apr 17, 2014 12:50 am
Location: Portland Main
Contact:

Re: List of Articles in Category -- High CPU and I/O

Post by Queasy » Wed Oct 15, 2014 8:20 pm

Have you tried caching such as xcache, memcache and something like Jotcache? It should help a lot and changing your php.ini or my.cnf by increasing memory helps if you're running a AWS/VPS. Also check out Cloudflare.

Watch out for misleading articles.

If you need more help please let me know.

Ellsinore
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Tue May 03, 2011 10:50 pm

Re: List of Articles in Category -- High CPU and I/O

Post by Ellsinore » Wed Oct 15, 2014 9:16 pm

Yes, I've tried several different caching solutions, and each one seems to mess up the site in it's own special way.

I don't know what "Watch out for misleading articles" means? :-)

Queasy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 155
Joined: Thu Apr 17, 2014 12:50 am
Location: Portland Main
Contact:

Re: List of Articles in Category -- High CPU and I/O

Post by Queasy » Wed Oct 15, 2014 9:45 pm

Do you have shell access, monitoring or access to logs?

Do you have access to htop, atop or top?

Nice to know which processes are causing the issues.

Ellsinore
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Tue May 03, 2011 10:50 pm

Re: List of Articles in Category -- High CPU and I/O

Post by Ellsinore » Wed Oct 15, 2014 10:28 pm

Yes, it would definitely be nice. I don't have shell access. The logs aren't really telling me anything. I'm on a shared host, so I'm limited in what I can actually do. There's a "Resource Usage" page that shows a graph of resources used -- and exceeded -- but doesn't tell me exactly what is causing the problem in the first place -- other than narrowing down the time frame. I've been using that to try to narrow things down by just refreshing the page. There's got to be a better way.

No htop, atop or top.

Queasy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 155
Joined: Thu Apr 17, 2014 12:50 am
Location: Portland Main
Contact:

Re: List of Articles in Category -- High CPU and I/O

Post by Queasy » Wed Oct 15, 2014 10:34 pm

I would contact your hosting and ask for details.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 25660
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: List of Articles in Category -- High CPU and I/O

Post by Per Yngve Berg » Thu Oct 16, 2014 8:42 am

Enable Debug in Global Configuration and watch for slow queries at the bottom of the site.

Ellsinore
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Tue May 03, 2011 10:50 pm

Re: List of Articles in Category -- High CPU and I/O

Post by Ellsinore » Thu Oct 16, 2014 4:08 pm

Per Yngve Berg wrote:Enable Debug in Global Configuration and watch for slow queries at the bottom of the site.
Well, that did the trick -- thank you. I had tried that before, but didn't see anything -- it's at the bottom of the page and I didn't scroll down far enough to find it. It is, in fact, running all of the mysql queries from the articles when generating the list of articles in the categories. Which explains why it got worse and worse as I added articles to that category.

Thanks!

Queasy
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 155
Joined: Thu Apr 17, 2014 12:50 am
Location: Portland Main
Contact:

Re: List of Articles in Category -- High CPU and I/O

Post by Queasy » Thu Oct 16, 2014 8:06 pm

Logs always help.

chrisvaughan
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Dec 30, 2007 9:23 pm

Re: List of Articles in Category -- High CPU and I/O

Post by chrisvaughan » Fri Nov 21, 2014 10:36 am

I think this is happening in J3 as well. I use Directphp extension in a few articles to load some extrenal data.
One of these articles is currently giving an alert, currently looking at this.
Anyway I have a menu item that lists all of these articles, they are all in one category.
When I click on the menu item I get the alert - this implies that J3 is running directphp extension on each article in the list.
Surely it should only retireve the meta data for the artcile.

Ellsinore
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Tue May 03, 2011 10:50 pm

Re: List of Articles in Category -- High CPU and I/O

Post by Ellsinore » Fri Nov 21, 2014 7:41 pm

chrisvaughan wrote:I think this is happening in J3 as well. I use Directphp extension in a few articles to load some extrenal data.
One of these articles is currently giving an alert, currently looking at this.
Anyway I have a menu item that lists all of these articles, they are all in one category.
When I click on the menu item I get the alert - this implies that J3 is running directphp extension on each article in the list.
Surely it should only retireve the meta data for the artcile.
I haven't had the opportunity to investigate this with J3 because, so far, I've only used J3 for new, simple sites that don't require much beyond basic articles. I haven't upgraded any of my old sites to J3.

However, in 2.5, I solved the problem by using Jumi to process any php. Unfortunately, this created a new problem -- Jumi doesn't recognize the page breaks in the code. So those articles are unpublished for now until I can get back to playing with it. They're large -- thus, the page breaks -- so for now they sit.


Locked

Return to “Administration Joomla! 2.5”