Topic on Project:Support desk

Jump to navigation Jump to search
Greylin (talkcontribs)


I'm using MediaWiki 1.34 on an Apache server.

My website has been generating a lot of 500 internal server errors and my web host thinks this may be due to Media Wiki high memory usage. Here's what they told me and I would be grateful for any suggestions from people with more knowledge than I have.

"Please note that all shared servers are running with Cloud Linux. This software allows us to isolate our customer’s usage on the server and provide more stability for our shared customers. With Cloud Linux, each account has following server resource limit:

2% CPU and MEMORY,

0.4% for MySQL or 5000 Total Connections

20% for Top Processes.

When those values are reached by an account the website's loading time will decrease due to those limitations and errors will appear i.e. 500 internal server error.

I have checked your cPanel>CPU and Concurrent Connection Usage>Snapshots, select the latest date/time, and found the following processes have been run by your account:




1557937 /opt/cpanel/ea-php72/root/usr/bin/php-cgi /home/xxxxx/public_html/wiki/load.php N/A 15

1557945 /opt/cpanel/ea-php72/root/usr/bin/php-cgi /home/xxxxx/public_html/wiki/load.php N/A 11

1557946 /opt/cpanel/ea-php72/root/usr/bin/php-cgi /home/xxxxx/public_html/wiki/load.php N/A 11

2244977 /opt/cpanel/ea-php72/root/usr/bin/php-cgi /home/xxxxx/public_html/wiki/load.php 0% 3

2251525 /opt/cpanel/ea-php72/root/usr/bin/php-cgi /home/xxxxx/public_html/wiki/load.php 0% 3

3299917 /opt/cpanel/ea-php72/root/usr/bin/php-cgi /home/xxxxx/public_html/wiki/load.php 0% 3

3688868 /opt/cpanel/ea-php72/root/usr/bin/php-cgi /home/xxxxx/public_html/wiki/load.php 0% 3


This indicates the 500 internal server error was caused by high memory usage from MediaWiki installation under /public_html/wiki/ directory. You may need to consult MediaWiki support desk to see if they have a patch or update script to fix the high usage."

This post was hidden by Greylin (history)
Ciencia Al Poder (talkcontribs)

MediaWiki is a very complex software that has quite high memory requirements. Unless your host already provides the installation for MediaWiki (and support), you're probably getting only problems with shared hosts.

A VPS or dedicated server is usually the best option.

AhmadF.Cheema (talkcontribs)

In addition to the above, if your Wiki was working fine previously, and without making any MediaWiki software changes, the site has suddenly started having high-memory usage issue, it might indicate a problem with the server configuration on your host's end too.

There have been bugs which cause previous PHP commands to not terminate properly causing them to stack up and create high-resource usage.

If you have SSH access, you can use the top command to see running processes live. Are the multiple PHP commands mentioned by your host running simultaneously? Do they dissipate when your Wiki is not being used?

Also, in case you use Extension:VisualEditor then shared hosting will most likely not be suitable for you.

Bawolff (talkcontribs)

if its all load.php (?) i guess its probably js minimization that is the issue.

Anyways, do you have object caching of some sort installed? It will probably reduce cpu usage a lot.

Greylin (talkcontribs)

Thank you for the suggestions.

I have contacted my web host with some of the questions you asked, as I don't know enough to answer them myself. I do know, however, that my two wikis have been running smoothly for years and this high memory usage is a new problem

So far both wikis are still only small in terms of content and numbers of people using them. Might it help the high memory usage if I exported and then removed one of them?

Ciencia Al Poder (talkcontribs)

Having one or multiple wikis shouldn't matter here if the memory limitation is for each request. Otherwise, having multiple wikis will matter only if both are being accessed concurrently, but if they're low traffic that shouldn't be a problem.

Greylin (talkcontribs)

Well. My web host now says they will increase the PHP limits for my website/account and are moving me to a newer server with more modern hardware/software, after which, they say, I should not experience this problem any more. This does feel right, given that the wikis problem has only cropped up within the past few months. I will report back.