General developer forum

Moodle 3. 3. database issues

 
moi!!! it is what is is...
Re: Ynt: Re: Ynt: Re: Ynt: Re: Moodle 3. 3. database issues
Documentation writersParticularly helpful Moodlers

@Ken, "Servers are simply underpowered."  The drawbacks of lower end virtualization I suspect, Ken. 

The issue is really the amount of RAM available, I suggest. If you have a 2GB RAM limit, and access to only one core of the CPU, then it's going to run slow, and under pressure, it will slow significantly. When I am running VMs I allocate 2 cores and a minimum of 4GB of RAM, performance is not that fast it couldn't be better, but it is not that slow that I can make a coffee between loading an app and sitting down to use it.  The i3 CPUs were all 4 core I believe, so you would likely be sharing the CPU with at least 2 other users and one core for the bare-metal hypervisor, or whatever system your provider uses. That's as far as I have pushed VMs, and there were significant performance issues, so I'm not willing to try any further. I had a Win10, a MacOS and a Ubuntu Linux running on a Win7 host, using VMWare Workstation Pro, an i3 CPU with 2GB RAM for each VM. The host machine has 16GB RAM for the host. The results were....mmmmm.... discouraging. Running a memory hog like PHP/MySQL is not likely to work well, I believe. 

As far as the errors are concerned, there may be some software issue, but I suspect that memory allocation is too slow and Moodle is outrunning it, or perhaps, allocation and releases are happening out of sequence, so errors are being thrown. But these are just guesses that may or may not be helpful at all. Ask your provider if you can upgrade your memory to 4GB for a month or so, see what happens.  

 
Average of ratings: Useful (2)
Picture of seçkin girgin
Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Moodle 3. 3. database issues
 

The issue is it was running smooth even on a slower server. The problem arised some months ago. And I know the hosting company. I have seen the reports that I was nowhere near pushing the limits of my plan. Because I don't have many active users. I believe there should be something wrong with my script but I haven't been able to locate it. At some point the system gets stuck for most probably a small reason. Btw so far your suggestions have been so useful and at least I could communicate with my provider using suitable terminology. smile 

I guess there's no way we can detect and fix any script issues? Or do most people simply erase everything and have a fresh start. But even if I do that, I will have to use my old database and Mysql which means I won't get rid of what I have been experiencing. I feel like kinda desperate now. 

 
Average of ratings: -
Picture of Ken Task
Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Moodle 3. 3. database issues
Particularly helpful Moodlers

Is your plan one where you are the only customer on a server?  If not, you are sharing resources - which includes DB server.  

The error you've shared in here clearly says 'Server has gone away'.    If I experimented (and I have before) with a sandbox server and un-set the max_allowed_packet ... ie, put it back to defaults ... would get a similar error ... 'Server gone away ... when running a backup.

So let's do this ... since you are stuck in decision making now ... and this is a good idea anyway if your server is experiencing problems ... let's see if you can make full user backups of the courses you have.

*IF* they succeed, download the backups.

Everyone who has responded here in this thread has said the same thing ... 2Gig memory not enough.

No, folks don't resolve such issues by wiping out the site and installing fresh.  If that's what you choose to do, then make sure you have course backups.

'spirit of sharing', Ken


 
Average of ratings: -
Picture of seçkin girgin
Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Moodle 3. 3. database issues
 

Ok white flag smile. I am going to upgrade my account temporarily and see if it the server capacity causing the issue. I will test it for a while. If not resolved then I will start from scratch.  Thanks everybody for your help and support.

 
Average of ratings: -
Picture of Ken Task
Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Moodle 3. 3. database issues
Particularly helpful Moodlers

Didn't mean to brow beat ya into submission! smile ... but ... you get those notifications from your Moodle, don't ya?   The ones that say a new version is available ... and 'strongly encouraged'.    Tech moves forward ... onwards/upwards ... eg. 'more' ... and because it does 'more' ... requires 'more'.  Go with the flow! smile

Now upgrading your account ... with your provider ... does that mean the DB server will be on your machine where you can admin it ... ie, set variables (there are multiple) for the DB ... not only max_allowed_packets but other to be in compliance with 3.3.x and ready for upgrades to 3.4 and 3.5 ... right?

So after they upgrade your account, first thing, try what you were doing to see if the error appears again.

If it does, fix it.  That error ... 'Server gone away ...' is fixable.

Yes, one pays more ... but hey ... at least the software is free!!!!  If you are willing to role up your sleeves a little and learn how to make those tweaks it's only your time.   How much do you pay yourself an hour?  If your courses are commercial, students will be happier ... best advertising in the world is a 'satisfied customer'.

Anhooo ,,, hang in there ... things could be worse! smile

'spirit of sharing', Ken

 
Average of ratings: -
Picture of seçkin girgin
Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Moodle 3. 3. database issues
 

So here's the thing. A developer will look into the issue in detail and I hope he will come up with solutions. I will share the results, findings and the solutions of course. I am grateful to all who have helped me sort things out. Thanks a lot.

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Moodle 3. 3. database issues
Particularly helpful Moodlers
Ken

You said:
> Everyone who has responded here in this thread has said the same thing ... 2Gig memory not enough.

Then you haven't read my post above, where i wrote:
>>> I would think 2 GB are enough for Moodle to take off...
 
Average of ratings: -
Picture of Ken Task
Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Moodle 3. 3. database issues
Particularly helpful Moodlers

Conflict?

"Obviously your server can not handle Moodle, a) either because it is too weak b) or it is misconfigured."

OP said on certain processes/usage server would 'mis-behave' ... even listed which/what.  So installation is semi working.   In the past, had investigated something similar and found that in some .php files Moodle was attempting to get 128M more memory before executing ... that was programmed into the file by a variable.  Strange things happen when max memory is reached or exeeded or SWAP space is used.

Anyhoo, OP has a 'developer' looking into it ... let's hope 'developer' can 'weave some magic' for  the OP. smile

'spirit of sharing', Ken


 
Average of ratings: -