system timesout while creating quiz

system timesout while creating quiz

by Alaukik Kotecha -
Number of replies: 3

I'm trying to create new quiz and system is taking lot of time..

In some courses quiz is getting added without problem but in courses where there is already a quiz, it is giving lot of time and when debugging is on it shows this following error :


Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 16384 bytes) in /var/www/html/learn/lib/dml/mysqli_native_moodle_database.php on line 1211


Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 1052672 bytes) in /var/www/html/learn/cache/stores/file/lib.php on line 368


i increased memory_limit in php.ini now it is working, but still it is taking lot of time..

Requesting for some guidance here

Average of ratings: -
In reply to Alaukik Kotecha

Re: system timesout while creating quiz

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You need to find more information about why it is being slow.

Try turning on display of performance info, at least temporarily: https://docs.moodle.org/39/en/Debugging#Performance_info.

Also, see if you can turn on slow query logging on your database server.
In reply to Tim Hunt

Re: system timesout while creating quiz

by Alaukik Kotecha -
thank you for your reply..

i did turn on developer mode in debug and also enabled performance info which comes in the footer.. please find below the performance details


  • 0.395608 secs
  • RAM: 9.3MB
  • RAM peak: 10.3MB
  • Included 463 files
  • Contexts for which filters were loaded: 0
  • Filters created: 4
  • Pieces of content filtered: 0
  • Strings filtered: 0
  • get_string calls: 469
  • DB reads/writes: 705/5
  • DB queries time: 0.25779 secs
  • ticks: 39 user: 12sys: 4 cuser: 0 csys: 0
  • Load average: 0.63
  • Session (core\session\file): 22.4KB
ModeCache itemStaticHMPrimary storeHMS
Appcore/capabilities** static accel. **13541default_application100
Appcore/contextwithinsights** static accel. **01default_application100
Sescore/coursecatdefault_session201
Appcore/coursecompletion** static accel. **015default_application1500
Appcore/coursemodinfodefault_application301
Appcore/databasemeta** static accel. **61922default_application2200
Appcore/eventinvalidation** static accel. **02default_application200
Appcore/fontawesomeiconmapping** static accel. **01default_application100
Appcore/groupdata** static accel. **11default_application100
Appcore/langmenu** static accel. **31default_application100
Appcore/message_processors_enabled** static accel. **01default_application100
Appcore/observers** static accel. **02default_application200
Appcore/plugin_functions** static accel. **116default_application1600
Appcore/plugin_managerdefault_application200
Reqcore/repositoriesdefault_request9918
Appcore/roledefs** static accel. **02default_application200
Appcore/string** static accel. **40792default_application9200
Appcore/user_group_groupings** static accel. **01default_application100
Appcore/yuimodulesdefault_application300
Appquizaccess_seb/configkey** static accel. **01default_application010
Appquizaccess_seb/quizsettings** static accel. **02default_application020
Apptool_usertours/tourdata** static accel. **01default_application100
Store nameCache storeHMS
** static accel. **23851620
default_applicationcachestore_file16731
default_requestcachestore_static9918
default_sessioncachestore_session201
Total256317420
P

In reply to Alaukik Kotecha

Re: system timesout while creating quiz

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I was going to say that looked fine: the whole page load only took 0.395608 secs, which is quite fast.

But, then I noticed DB reads/writes: 705/5. 705 DB reads on a single page is bad. You need to try to find out why that is happening. (It did not cause a problem in your testing, but when lots of users are attempting a quiz at the same time, that will overload the DB server. A reasonable number is more like 30