Error Log - Shared Server Resources?

Error Log - Shared Server Resources?

by The Web Side -
Number of replies: 9

Hi Guys,

First time post to this particular group. While building my courses I received some 502 Gateway Errors. This usually would happen when I was deleting a block, or saving an image to a book. I was advised to purge the moodle cache, and then the block did delete for me. But later the 502's returned. I was the only one logged into the system as classes have not started yet.

I am on Siteground's Gogeek plan, featured here...https://www.siteground.com/shared-hosting-features.htm

Gogeek Server

gogeek db 40GB SSD, Can't find detail on CPUs, Cores etc

Last year, I was on their lower plan GrowBig, and did not have any issues. I migrated that install to a new account within siteground & upgraded from 3.6.4 to 3.8.1.

I have been fighting an uphill battle with my host to try and figure out why I'm having these issues. They flatout deny it is due to a lack of resources, but anyone who's looked at it for me, says it is and that I should move to a VPS. The crazy thing is that I'm the only one logged in, and just building these courses. This makes me really worried for when the students logon. I probably won't have more than 50 students logged on concurrently, and they won't be taking quizes at the same time. I intend to turn off messaging as well to reduce that traffic. I will however have about 1000 students overall.

Here are the Errors showing up in the server error logs and sitegrounds comments.

In the latest logs the scripts that are recorded to hit Mod_Security are as follows (with number of errors first):

     53 "/courses/theme/yui_combo.php"]

23 "/courses/lib/ajax/service-nologin.php"]
11 "/courses/auth/wdmwpmoodle/wdmwplogin.php"]
3 "/courses/mod/book/edit.php"]

As a workaround, we can possibly try to exclude the scripts that hit Mod_Security. 

I've given them the ok to go ahead and make that change. 

I know that my PHP_Max Execution and Input is 120.

Here's a short video of all my php variables:

https://drive.google.com/file/d/1zoMpgFNLnKTsm7Gel893Nf9eTgnkKvrv/view?usp=sharing

I've read through a lot of posts and have learned alot tonight, I fear I should have done this a month ago! My classes start on wednesday, so just wondering if you guys have any thoughts on my setup? 

Thanks in advance guys.

I've attached some error logs.





Average of ratings: -
In reply to The Web Side

Re: Error Log - Shared Server Resources?

by Ken Task -
Picture of Particularly helpful Moodlers

1st log (didn't even bother with 2nd log) ...
all are mod_security and all appear to have same

Execution error - PCRE limits exceeded (-8)

https://support.atomicorp.com/hc/en-us/articles/360000188468-Rule-execution-error-PCRE-limits-exceeded-8-null-

The IP addresses (referred to as clients in log clip:
109.77.188.202
route:          109.77.128.0/17
descr:          Vodafone Ireland

77.207.85.148
descr:          Service FTTx
country:        FR

Bet the second IP address is you.

I have a CentOS 7 box on Rackspace and have seen some pokes and probes from Vodafone IP's.  Not enough for me to worry about it yet.  That sort of thing will go on forever ... 1 or 2 ok ... but 20 etc. that's too much.   Might consider contacting SiteGround Security ... might be en error as Vodafone might actually have something on Google also and someone/thing is just using the wrong range of IP address for their checks (happens).

Nice thing about CentOS 7 firwwall ... have a drop zone ... if an ip address is put into drop zone of firewall, your server goes 'dark' ... that IP cannot be used to access anything on your server.

Cron Job interval ... limited ... best if cron runs 1 time every minute.  That doesn't mean all crons/task will run every minute for there is a task list that has a schedule of it's own.

Geeky ... I see DB queries up to 30% of server ...
DB servers run best if one could fit all the DB in memory.
Then there is no disk I/O, but that's kinda hard to do on a single
server that also has to run the web interface/moodle code - web service plus number of students doing what at same time ... etc.

Can you install anything on your server?   Access to ssh as root?
A good tool for DB's is MySQLTuner ... it's Perl however and would require perl to run it.

When running with superuser creds for your DB server, one section of Tuner's report shows something like this:

[OK] Maximum reached memory usage: 2.0G (26.81% of installed RAM)
[OK] Maximum possible memory usage: 2.2G (28.90% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available

Server upon which above was run has:

[root@server ~]# free -h
                      total        used        free

Mem:           7.6G        1.5G        308M

Server above is a sandbox server ... no regular classes running all the time and it runs multple moodles ... 3.5->3.9

So on a standalone all in one it's kinda a balancing act ... DB server vs web service + whatever else server is doing/serving

My 2 cents! smile

'SoS; Ken

In reply to Ken Task

Re: Error Log - Shared Server Resources?

by The Web Side -
Thanks Ken, a lot to mull over.
In reply to The Web Side

Re: Error Log - Shared Server Resources?

by Ken Task -
Picture of Particularly helpful Moodlers

Ok, too much, huh?  That's me ... however, regardless of CPU's and time settings etc. you need to ask provider about the mod_security errors.

Both of your logs shared show this:

Execution error - PCRE limits exceeded (-8):

coming from your own host.

[uri "/courses/theme/yui_combo.php"]

that's your themes ... any and all that use yui_combo.php

Get that sorted and might not have to increase php times at all.  Check with provider about it.  Do you have the ability to turn off mod_security?

Just my 2 cents!

'SoS', Ken

In reply to The Web Side

Re: Error Log - Shared Server Resources?

by Usman Asar -
Picture of Plugin developers Picture of Testers
Stephen, the price you paid for GoGeek and the resources you got in return - absolute waste of money
they should at least have given 300 secs to max execution time, no wonder why 500 errors are being thrown at you.
In reply to Usman Asar

Re: Error Log - Shared Server Resources?

by The Web Side -
Thanks Usman. That has me really concerned now, my courses start tomorrow. Stupid thing is, it worked without issue last year on their growbig plan.
Do you have any recommendations for someone with 300 seconds Max_execution_time?
In reply to The Web Side

Re: Error Log - Shared Server Resources?

by Usman Asar -
Picture of Plugin developers Picture of Testers
Stephen every other hosting I have seen gives at least 300 seconds time limit, if it served 3.6 last year, it should have easy served you with 3.8 too, how many students you had last year concurrent (estimated).

have you done installation through script installer by any chance?
In reply to Usman Asar

Re: Error Log - Shared Server Resources?

by The Web Side -
I ended up moving the Moodle install to a Server on Digital Ocean...no performance issues. Siteground is garbage in comparison.

https://nimb.ws/LQlRTZ

4 GB / 2 CPUs
80 GB SSD disk
4 TB transfer

USD 25 per month
Migrated moodle to a VPS.

DO server is a Linux (CentOS 8) server.
Webserver: Apache
Database: Mariadb
Average of ratings: Useful (1)
In reply to The Web Side

Re: Error Log - Shared Server Resources?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Did you go through Site administration > Reports > Performance overview and other https://docs.moodle.org/en/Performance_recommendations linked in the header of this forum?
In reply to Visvanath Ratnaweera

Re: Error Log - Shared Server Resources?

by The Web Side -
I had read that Visvanath and as I said above, I moved over to Digital Ocean with the above configuration and voila, no more issues!