2

How best can I troubleshoot an excess memory utilisation issue for a client with a Joomla website on shared hosting where nothing has apparently changed except for a sudden increase in the memory utilisation to the extent that Cloud Linux is shutting the website down with "Internal Server Error 500" errors.

I don't have admin access to the server but do have access to cPanel. The web hosting company are fairly helpful if I know the right question to ask.

1
  • 1
    Did you try the debug option? Especially with Joomla 3 you will see a lot of helpful informations, including memory consumption at different stages. That should help narrow down the problem.
    – Bakual
    Commented Apr 23, 2014 at 12:44

2 Answers 2

4

You can manage the Joomla site on the site level by enabling debugging and seeing what's occurring on the pages if we're talking about Joomla 3.x. From there, you can make any adjustments necessary(reworking queries, trimming out offending extensions, etc).

You should also be able to get a more involved look at the situation in real time using htop through SSH, which will not only tell you about running processes, but in most cases, what precisely is running. You can achieve similar results with the "sar" command, but a perk to this will also give you the server's "trends", especially useful if you're on a dedicated hosting environment.

Of course, if all else fails, you can permit the account for additional resources under LVE. I don't know to what extent your site is consuming memory, so I can't say if it would be "too much" for your situation. CloudLinux on base configuration initiates extremely conservative limits on accounts.

If you are not an admin on the server but are using cPanel, raise the concern with your host and see if they can get you any of the information mentioned previously(you could also mention that you're experiencing these memory spikes and want to know what's going on, most of the time they can help pin-point the issue but unless they know anything about Joomla, they may also tell you something that doesn't quite make sense and could be potentially incorrect).

You may have a plugin called "Resource Usage" or "Resource Usage Details" on your cPanel home screen, if not, I'm sure your host would be happy to install it. This way at least you have that information available in the future and won't have to wait on a response from the host to really get into troubleshooting.

2
  • Thanks @Milton, this is good advice and will likely help others too. I don't think I have SSH access on this particular server and have clarified the question to make it clear that this is on a shared host and I only have cPanel access. Commented Apr 23, 2014 at 13:43
  • 1
    Thanks for clarifying @Neil. I've modified my response to include options for non-server admins. Commented Apr 23, 2014 at 14:35
1

@Milton-bryant has a good answer but it wouldn't help you in case of an 500 error because you wouldn't see any profile data.

What you can do is to modify the joomla profiler to write the output to a file after each mark. This could be done by editing the file libraries/joomla/profiler/profiler.php at line 135 in the mark function.

replace

$this->buffer[] = $mark;

with

file_put_contents(JPATH_BASE.'/logs/profiler.log', $mark, FILE_APPEND);
$this->buffer[] = $mark;

this saves every mark entry to the logs folder, with this information you may find the section of the problem.

You may have to activated "Debugging" in the configuration.

1
  • Thanks Harald. The 500 error coincided with the excess resource usage but was not there all the time so the debug information was available eventually. Commented Jun 4, 2014 at 5:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.