Moodle too slow when either SELinux is turned off or httpd_can_network_connect_db is turned off

Moodle too slow when either SELinux is turned off or httpd_can_network_connect_db is turned off

by Nipun Lakshan -
Number of replies: 1

I recently migrated a Moodle site from a local server to AWS EC2 (CentOS 7). The database was also installed on the same EC2. What I actually planned was to keep the database on an AWS RDS. Then I created the RDS, tested it if it is accessible from a server, restored the existing moodle database into RDS, and changed Moodle's config.php to use the RDS database. It didn't work due to SELinux permission. Therefore I turned it off, then it started working but was too slow. After doing many experiments, I identified that disabling SELinux or making httpd_can_network_connect_db to true makes the Moodle slow. Even if I use the database in the same EC2, if SELinux is turned off, the same result happens. Now what I temporarily did was keeping the Moodle Database on the same server. This is not good. Please help. What could be the issue?

Average of ratings: -
In reply to Nipun Lakshan

Re: Moodle too slow when either SELinux is turned off or httpd_can_network_connect_db is turned off

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
AWS is a world of its own, speaks a different language than the generic Unix/Linux/Debian/RedHat crowd. There are not many AWS speakers active on moodle.org so far, except for in the Hardware and performance forum. You might want to read the AWS related discussions there.