Error launching a quizz

Error launching a quizz

by Eric PERSAN -
Number of replies: 4

Hi,


We are using moodle for years without problems but since this morning a quizz which was previously working well is generating the following error :

I don't find any related issue browsing and searching the Web.

Can somebody help me please ?


Eric

Erreur de lecture de la base de données
Debug info: MySQL server has gone away
SELECT value FROM mdl_config_plugins WHERE plugin = ? AND name = ?
[array (
0 => 'admin',
1 => 'lastloginserterrormail',
)]
Error code: dmlreadexception
Stack trace:
  • line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 1023 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1382 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 1455 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 1436 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
  • line 1415 of /lib/dml/moodle_database.php: call to moodle_database->get_field_select()
  • line 1363 of /lib/moodlelib.php: call to moodle_database->get_field()
  • line 1844 of /lib/datalib.php: call to get_config()
  • line 73 of /mod/quiz/view.php: call to add_to_log()
Erreur de lecture de la base de données
Debug info: MySQL server has gone away
SELECT
bi.id,
bp.id AS blockpositionid,
bi.blockname,
bi.parentcontextid,
bi.showinsubcontexts,
bi.pagetypepattern,
bi.subpagepattern,
bi.defaultregion,
bi.defaultweight,
COALESCE(bp.visible, 1) AS visible,
COALESCE(bp.region, bi.defaultregion) AS region,
COALESCE(bp.weight, bi.defaultweight) AS weight,
bi.configdata
, ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, ctx.instanceid AS ctxinstance

FROM mdl_block_instances bi
JOIN mdl_block b ON bi.blockname = b.name
LEFT JOIN mdl_block_positions bp ON bp.blockinstanceid = bi.id
AND bp.contextid = ?
AND bp.pagetype = ?
AND bp.subpage = ?
LEFT JOIN mdl_context ctx ON (ctx.instanceid = bi.id AND ctx.contextlevel = 80)

WHERE
(bi.parentcontextid = ? OR (bi.showinsubcontexts = 1 AND bi.parentcontextid IN (?,?,?)))
AND bi.pagetypepattern IN (?,?,?,?)
AND (bi.subpagepattern IS NULL OR bi.subpagepattern = ?)
AND (bp.visible = 1 OR bp.visible IS NULL)
AND b.visible = 1

ORDER BY
COALESCE(bp.region, bi.defaultregion),
COALESCE(bp.weight, bi.defaultweight),
bi.id
[array (
0 => '138',
1 => 'site-index',
2 => '',
3 => '138',
4 => '132',
5 => '15',
6 => '1',
7 => 'site-index',
8 => 'site-index-*',
9 => 'site-*',
10 => '*',
11 => '',
)]
Error code: dmlreadexception
Stack trace:
  • line 426 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 960 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 628 of /lib/blocklib.php: call to mysqli_native_moodle_database->get_recordset_sql()
  • line 1377 of /lib/pagelib.php: call to block_manager->load_blocks()
  • line 829 of /lib/pagelib.php: call to moodle_page->starting_output()
  • line 732 of /lib/outputrenderers.php: call to moodle_page->set_state()
  • line 2365 of /lib/outputrenderers.php: call to core_renderer->header()
  • line ? of unknownfile: call to core_renderer->fatal_error()
  • line 1455 of /lib/setuplib.php: call to call_user_func_array()
  • line 375 of /lib/setuplib.php: call to bootstrap_renderer->__call()
  • line 375 of /lib/setuplib.php: call to bootstrap_renderer->fatal_error()
  • line ? of unknownfile: call to default_exception_handler()

Average of ratings: -
In reply to Eric PERSAN

Re: Error launching a quizz

by Ken Task -
Picture of Particularly helpful Moodlers

"MySQL Server has gone away" is normally an indication that too much data is involved between Moodle and Database.   Fix is to add setting to my.cnf (MySQL config) for max_packets_allowed.   Default is 16M so advise doubling to 32M at least.

Official MySQL doc:

https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html

max_allowed_packet=32M
When changing config of MySQL, the service needs to be restarted.

'spirit of sharing', Ken

In reply to Ken Task

Re: Error launching a quizz

by Eric PERSAN -

Thank you Ken for your quick answer!


I 've just tried this setting and the problem still occurs. sad


I'm not a DBA and no more a PHP guy smile 

We have a lot of other tests on the same server which are not affected and some of them are bigger than it.


Eric


In reply to Eric PERSAN

Re: Error launching a quizz

by Ken Task -
Picture of Particularly helpful Moodlers

Does it report the same error?   When trying to 'size up' a quiz ... ie, how large it is, think it might be difficult to 'size up' the data involved.   Number of questions might be fewer than other quizzes, but that doesn't mean there is less data involved given question types and if the questions had images contained there in as example.

Since you've said using moodle for years ... Moodle version is?   This on a 64bit box or a 32bit box?  Think php info server link in Site Admin Menu, Server might provide more info about system.

So, suggest pushing the setting even higher ... how about 64M?

'spirit of sharing', Ken

In reply to Ken Task

Re: Error launching a quizz

by Eric PERSAN -

Hi Ken,


It reports the same error! I'll try tonight may be tomorrow the 64M setting.


Moodle Server is a 64 Bit linux ubuntu VM running on top of vmware esx 5.5. 4vCPU and 8GB of RAM

PHP 5.3.10

Mysql 5.5.31

Moodle 2.4.3+

"Years" means this server is running for around 3 years.


The test was running well for months. I don't remember how many questions it has. Generally around 50.

The server is only used for quizzes. We don't use it for the other stuff.


Regards from France

Eric