Moodle on Shared Hosting Issue

Moodle on Shared Hosting Issue

by Terry Waterman -
Number of replies: 11

Hello everyone

I work for a small business in Ottawa, Canada, and we’ve been running Moodle for about 6 months to serve as an online “materials home” for our (live) online training programs, which we run on Zoom.   

I’m a trainer (Jim) not an IT guy (biggest problem).  We can’t find or afford an IT guy (for our web, at least).  However, I’ve run Moodle before and never had any issues.  I also run two WordPress sites.  However my main thing is running training programs. I'm a functional noob, I guess?  

Background

I'm running Moodle 3.11.2+ (Build: 20210820) All green checkmarks in the upgrade list. Server architecture Linux 3.10.0-042stab144.1 x86_64 PHP version 7.4.29  (PHP memory limit 256M)

Currently, we use Edwiser Bridge to link the WordPress and Moodle site and automate enrolment.  We have 288 users, but most are not active at all. (Most of these people log on for a free one-hour webinar and never log on again.)

At the current moment, I am the only one on the site and most times, according to the online user block, it’s pretty dead.  The general usage would be for people to log in, download a PPT (about 3-5 MB), look at some pdfs (under 1MB) and click on a link to attend a live Zoom session.  (Note: this is not when the errors appear, more on that in a second).

Problem

Moodle has worked very well until recently when we’ve started getting ‘out of memory’ issues across two of our servers appearing as 500, critical website error, etc. and it has fallen to me to troubleshoot.  

In the end, the hosting company we use (a small business itself) is saying that this is an issue caused by running Moodle on a shared server, and it is destabilizing Moodle itself and our 2 WordPress sites.  They are saying there is nothing we can do unless we move from shared hosting to a dedicated server with “up to 32GB” of RAM at about 6-7x times the cost.  They blame the per minute crons, etc.  (Keep in mind when I asked them to install it, they charged us for the installation and said nothing about this at the time.)

From looking at the logs, I don’t see how Moodle could be hogging that many resources when we are talking about a very rare max 5 concurrent users at a time.  No errors except from cron (out of memory) and these 400MB core.#### dumps in filling up our HTTP and WordPress directory that make me think something else is going on.  The hosting company hasn’t offered any solutions to this except ‘upgrade’.

My questions:

1. Does this sound fishy to you?  As I mentioned, I’ve run another Moodle installation on another well known (shared) host (SG) and never had anything like this happen.

2. The hosting solution set this up with a PostgreSQL database and that I do not have access to (they use Plesk).  I don’t have any worry about actually getting a copy of the database, but if I migrated to somewhere, would it be possible to have this as an accessible database via CPanel/PHPMyadmin?

3. I used a MariaDB/PHPMyadmin installation previously without any worries.  I almost feel like just backing up the courses and user lists and starting fresh—anything I’d be missing?

While I would love to dedicate a lot of time to this, I can’t as this is only part of my job.  So I’m open to any suggestions (including DMs of Canadian hosting solutions, if that's allowed on this forum).  I'd like to stay with Moodle as I know, like it and it has worked well previously.

Thanks for reading!

Average of ratings: Useful (1)
In reply to Terry Waterman

Re: Moodle on Shared Hosting Issue

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
"Does this sound fishy to you? "
Yes
"I’m a trainer (Jim) not an IT guy"
Your post reads to me like you are both smile
What are you being charged for this shared solution?
Average of ratings: Useful (2)
In reply to Marcus Green

Re: Moodle on Shared Hosting Issue

by Terry Waterman -
Hi Marcus, yes lol.. I guess in the absence of an IT guy, I am the IT guy :P

It's not much for the service. I think we pay about $600-$800 yearly (they charge us for extras like installing Moodle which was $200). The upgrade was in the realm of $200/month (or the option of a 'go it alone' for $60/month.)

Thanks.
In reply to Terry Waterman

Re: Moodle on Shared Hosting Issue

by Ken Task -
Picture of Particularly helpful Moodlers

My 2 cents ... for what that is worth ... briefly ...

https://edwiser.org/documentation/edwiser-bridge/
At the top of above page is a notice about Moodle 4.0.

(PHP memory limit 256M) is maxed ... that's a php setting, but not
really the max memory your shared slice of that server has.  Probably a cap.   See that in Plesk?

So there are times, when cron runs things like automated backups, that memory cap
is preventing ... causes server panic ... and dumps core!   All customers
on that shared hosting server would be affect, me thinks.

core dumps ... are not good and it would take someone with kernel expertise
to decipher them.   You shared what appears to be info about Vertiozo (sp?) which is the virtual operating system ... if I am correct it's based on CentOS 6 which has reached end of life some time ago.    If that's true ... yes, you do need to move!!!

'... across two of our servers ...' how many servers do you have?   Maybe it's really
sites that you mean.  2 WP's one with Edwiser Bridge that hooks into the moodle.

Plesk ... is perhaps the most strict panel of them all.

If you migrate that means you are moving hosting and all of what you run needs to be
backed up and transferred to new hosting.   Not sure postgres DB dumps can go straight into mariadb/mysql servers.

SG = Site Ground ... their newer server offerings are actually hosting on Google infrastructure ... SG has a panel of their own that they are still programming to offer customers tools they probably need.

I'd say they are 'up-selling' you to their caddie when you very well could do with a Chrysler .. so to speak.   32Gig on a dedicated VPS is kinda overkill and it means you take on more of the backend than you are doing right now.   Ready for that?  Can you afford support fees?   They probably won't go into moodle specifics.

Sent you a PM with an offer for a freebie look see and/or a talk.   Please respond.

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Moodle on Shared Hosting Issue

by Terry Waterman -
Thanks so much for this, Ken. A lot of great stuff to unpack. A couple of quick points:
-yes we have 3 sites (not servers, whoops!).
-really interesting about the outdated virtual operating system! this is pasted right from the WordPress server info page, so I think this is true.
-thanks for the heads up on Edwiser. I wasn't planning to upgrade right away, but now I know why wink
-I don't know much, but I know 32G a bit of overkill. This was actually used in the sentence "Moodle needs minimum 8GB and probably 32G" which immediately made me think of your caddie metaphor.
I'll follow up with the rest on PM.
In reply to Terry Waterman

Ri: Moodle on Shared Hosting Issue

by Sergio Rabellino -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hard to say if it's fishy or not, as in a shared environment it's like a crowded lift, who pushed the button to the wrong floor ?
Maybe it's time to change web service provider ? Canadians should be able to suggest the best for you.
Average of ratings: Useful (1)
In reply to Terry Waterman

Re: Moodle on Shared Hosting Issue

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Purely on resource consumption people run the latest Moodle even on Raspberry Pi 3 series and where a couple of hundred users could be logged in at the same time https://moodlebox.net/en/news/version-4.3.0/. That doesn't mean that you can throw a whole software stack at the Pi and it will take care of everything. No, the developer has invested quite an amount of Linux system administration in to the project. Your 5 users logged overloading the server could only mean, either bad system administration or the server is hopelessly overbooked.

If somebody says the solution is 32 GB RAM, yes, something is not right.

You will find a whole "knowledge database" on Moodle and performance in the Hardware and performance forum https://moodle.org/mod/forum/view.php?id=596.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Moodle on Shared Hosting Issue

by Terry Waterman -
Thanks for this--yes, I don't think the error is coming from Moodle (although this is my impression vs the hosting company). It does seem like it could be bad management (they've had certificate issues, lost DNS regs, etc.). I see nothing 'taxing' in the way we are using Moodle, and that hasn't changed.

I think it is literally someone else on the 'lift' to borrow Sergio's analogy above (whether hacked or what). Unfortunately, I am pretty new at the company and the hosting solution is something that they have used for years (for mainly a very basic CMS website) so I find myself ill-equipped to make a case against leaving the hosting company as the management involved know even less than I do.
In reply to Terry Waterman

Re: Moodle on Shared Hosting Issue

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> (for mainly a very basic CMS website)

The most important thing was within brackets. People need to say this aloud: "Moodle is not WordPress!" (Search this phrase in the Hardware and performance forum.)
Average of ratings: Useful (2)
In reply to Terry Waterman

Re: Moodle on Shared Hosting Issue

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Just to throw this out there - you don't by chance have automated backups running do you? Could it be that they are not completing and then trying to rerun through every cron instantiation...I was just working on a site where the setting said to keep 100 copies of each course!! Luckily it was set up to a nonexistent folder so it wasn't working anyway but that could cause some memory issues.
In reply to Terry Waterman

Re: Moodle on Shared Hosting Issue

by Ken Task -
Picture of Particularly helpful Moodlers

@Sergio's comment about Moodles in Canada is a good suggestion for you to research.

To assist with that, please see:

https://stats.moodle.org/sites/index.php?country=CA

Canada 2840 sites total (2224 are private and are not shown)

You might recognize some and be able to call them on the phone to ask about their hosting situation - maybe even compare notes if they host where you host!

And 2 cents more ... for others seeking hosting, wouldn't hurt to mention your current hosting provider by name. smile

'SoS', Ken


Average of ratings: Useful (1)
In reply to Terry Waterman

Re: Moodle on Shared Hosting Issue

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers
I think you need to find out what is going on in cron. As Emma suggested, there are real problems that occur in there. And running out of memory during cron, really points to a problem in Moodle I suspect.

I wonder what logs you looked at. The apache php error log and access logs won't contain errors that occur in cron. Because they run outside the web environment usually.

A simple thing to do is to go to site admin -> server -> tasks and look at the task logs. probably for failed tasks.
A classic issue can be if adhoc tasks are queued up to the sky. I have seen sites with 40,000 tasks waiting to run. This can happen if long running tasks dont finish in the cron window and everything else queues up. I am not sure of the best way for a site admin to check the adhoc task queue. Perhaps there is a report somewhere for that.

On dev sites I often have cron turned off and run it via my browser and watch the output.
Average of ratings: Useful (1)