Bug #1869

Moodle fails to intall....

Added by bigfoot65 over 6 years ago. Updated almost 6 years ago.

Target version:
Start date:
Due date:
% Done:



fails to install. The script times out and the app never installs.

Application has been moved back to BETA until this is resolved.


#1 Updated by bigfoot65 over 6 years ago

  • Status changed from New to Closed

Updated to the latest version and changed the install script a bit. Appears to be working correctly now.

Passed testing with Grinder and a manual test on VM was successful.

#2 Updated by bigfoot65 over 6 years ago

  • Status changed from Closed to Assigned

It was working locally, but now seems to be having issues again. Will continue to diagnose the issue and hopefully resolve.

Install script times out for some reason. There are a lot of files in the source, so not sure if that is bogging things down.

#3 Updated by bigfoot65 over 6 years ago

SQL file contains around 12,000 lines and that is causing the install script to time out. As a work around, I was able to background process the SQL so the app install could finish.

It takes a minute or two after the app is installed to finish. When a user tries to access the app, the see the message "Error reading the database". Once the data is loaded, the app will function as normal.

Not the best solution, but it is working for now. Will continue to explore other options to properly fix this issue.

#4 Updated by bigfoot65 over 6 years ago

Refined the patch file to include data and the SQL is in a separate file. Using zcat, it's loading properly and the install script is not timing out.

This should be fixed. Will wait and see if anyone has any errors. If not, will close as solved.

#5 Updated by bigfoot65 over 6 years ago

App is once again having problems. It appears to be related to the database SQL being loaded as it's quite large (over 11,000 lines).

I have moved it back to BETA and will have to see what else can be done to correct the problem.

#6 Updated by bigfoot65 over 6 years ago

This is the amount of time it took to load the database manually:

0.03user 0.01system 2:13.58elapsed 0%CPU (0avgtext+0avgdata 7564maxresident)k
0inputs+0outputs (0major+462minor)pagefaults 0swaps

#7 Updated by bigfoot65 over 6 years ago

Did some experimentation on unarchiving and loading of SQL. The results are as follows:

1.61user 2.79system 0:22.66elapsed 19%CPU (0avgtext+0avgdata 4148maxresident)k
0inputs+354896outputs (0major+600minor)pagefaults 0swaps

1.04user 0.88system 0:03.17elapsed 60%CPU (0avgtext+0avgdata 2668maxresident)k
0inputs+354896outputs (0major+277minor)pagefaults 0swaps

1.09user 0.98system 0:56.57elapsed 3%CPU (0avgtext+0avgdata 2572maxresident)k
640inputs+354896outputs (2major+275minor)pagefaults 0swaps

0.02user 0.04system 0:00.07elapsed 101%CPU (0avgtext+0avgdata 2660maxresident)k
0inputs+9568outputs (0major+278minor)pagefaults 0swaps

0.02user 0.02system 3:21.36elapsed 0%CPU (0avgtext+0avgdata 7568maxresident)k
0inputs+0outputs (0major+461minor)pagefaults 0swaps

Took the source file and created a tar.gz version as the site does not provide one. It takes much less time to unarchive so that might help with timing.

#8 Updated by bigfoot65 over 6 years ago

I have had one successful install out of 4 thus far after making modifications. I am fairly confident it's the SQL load that is causing the issue.

Not sure, but maybe splitting the file might help.

#9 Updated by bigfoot65 almost 6 years ago

  • Status changed from Assigned to Closed

Found a solution that will expedite loading of large SQL files. It turns off unique and foreign key checks were are not necessary when restoring the database.

All tests so far indicate this is working now.

Marking this one as solved.

Also available in: Atom