create new course and delete empty course take 3 minutes

create new course and delete empty course take 3 minutes

by Rizal Masandiansyah -
Number of replies: 7
We had an issue where creating and deleting courses felt very slow, it could take up to 3 minutes on an empty course that didn't have any content.



We have tried making a new Moodle site fresh install with the same infrastructure settings (apache, PHP) but there is no slow issue like the other Moodle.



The version of Moodle we use is 4.1.5. kindly please advise.


Average of ratings: -
In reply to Rizal Masandiansyah

Re: create new course and delete empty course take 3 minutes

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Are you saying that creating a course takes 3 minutes, deleting a course takes 3 minutes, or both?

Have you got the recycle bin enabled? This has to back up the course when its deleted. It still shouldn't take that long but its a factor I would want to eliminate.
In reply to Howard Miller

Re: create new course and delete empty course take 3 minutes

by Rizal Masandiansyah -
creating course takes 3 minutes and delete empty course average 2 minutes.
Previously recycle bin is enabled but after we disable it the issue still persist.
In reply to Rizal Masandiansyah

Re: create new course and delete empty course take 3 minutes

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

Did you read the initial pointers linked to the header of this forum? What steps have you taken?

In reply to Visvanath Ratnaweera

Re: create new course and delete empty course take 3 minutes

by Rizal Masandiansyah -
Hello, thanks for the advice. below step we had take
1. Created a test environment that is the same in terms of server infrastructure, OS, Redis server and others, exactly the same as the Moodle site which has issues, only different in terms of data such as courses, users and so on. However, the test environment does not get the same issue.

2. Checked writing data to the database server and it went well.

3. Turned on debugging but didn't find anything.

4. Tried replacing the Moodle data with an empty one on the Moodle site that has the issue and the result still gets the same issue.

5. Tried using Boost and Classic themes and still has the issue.

6. Check that hardware usage is still low.

7. Remove plugins that intervene during the process of creating and deleting courses.
In reply to Rizal Masandiansyah

Re: create new course and delete empty course take 3 minutes

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
What is the output of Moodle Benchmark?
In reply to Visvanath Ratnaweera

Re: create new course and delete empty course take 3 minutes

by Rizal Masandiansyah -
On average, the results of the Moodle Benchmark between Moodle sites that have issues and those that don't are almost the same, but on Moodle sites that have issues they always appear like this.

cURL request for "https://moodlexxx.xxx/admin/index.php?cache=1" failed with: Connection timed out after 20000 milliseconds (28)
line 1639 of /lib/filelib.php: call to debugging()
line 309 of /report/benchmark/testlib.php: call to download_file_content()
line 95 of /report/benchmark/locallib.php: call to report_benchmark_test::notificatiopagedownload()
line 61 of /report/benchmark/locallib.php: call to report_benchmark->start_test()
line 74 of /report/benchmark/renderer.php: call to report_benchmark->__construct()
line 55 of /report/benchmark/index.php: call to report_benchmark_renderer->display()

below the test result
first test



second test


third test

In reply to Rizal Masandiansyah

Re: create new course and delete empty course take 3 minutes

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You are wondering? Benchmark results in excess of 6,000, when reasonable machines are around 100? See [Moodle BenchMark] Need Beta-tester.

This test 9 is in a category of its own. I had a streak with it, but then went down in the priority list: [Moodle Benchmark] Why is the result of Test 2 good and that of Test 9 bad? 

No, I don't have an explanation. Hope somebody else will enlighten us.