Erro ao ler a base de dados

Erro ao ler a base de dados

por Gedeon J Lidório, Jr -
Número de respostas: 6

Alguém pode me dar uma luz sobre o que está acontecendo no meu Moodle (2.5.1 + Apache + cPanel). Habilitei o debug para ler o erro, mas ainda assim não consegui detectar. 

Veja abaixo:

Debug info: MySQL server has gone away
SELECT * FROM mdl_context WHERE contextlevel = ? AND instanceid = ?
[array (
0 => 50,
1 => '1',
)]
Error code: dmlreadexception
Stack trace:
line 423 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 1005 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1397 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1369 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
line 1348 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 6588 of /lib/accesslib.php: call to moodle_database->get_record()
line 885 of /lib/pagelib.php: call to context_course::instance()
line 42 of /index.php: call to moodle_page->set_course()

 

e também:

Debug info: MySQL server has gone away
SELECT name,value FROM mdl_user_preferences WHERE userid = ?
[array (
0 => '2',
)]
Error code: dmlreadexception
Stack trace:
line 423 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 1005 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1226 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1177 of /lib/dml/moodle_database.php: call to moodle_database->get_records_select()
line 1266 of /lib/dml/moodle_database.php: call to moodle_database->get_records()
line 1730 of /lib/moodlelib.php: call to moodle_database->get_records_menu()
line 1943 of /lib/moodlelib.php: call to check_user_preferences_loaded()
line 9082 of /lib/moodlelib.php: call to get_user_preferences()
line 663 of /lib/pagelib.php: call to get_user_device_type()
line 734 of /lib/pagelib.php: call to moodle_page->magic_get_devicetypeinuse()
line 1543 of /lib/pagelib.php: call to moodle_page->__get()
line 1462 of /lib/pagelib.php: call to moodle_page->resolve_theme()
line 1478 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()
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()

 

Obrigado.

Gedeon

 

Contagem das avaliações:  -
Em resposta à Gedeon J Lidório, Jr

Re: Erro ao ler a base de dados

por Márcio Benedito -

Você deve ajustar as seguintes variáveis no arquivo my.ini:

[mysqld]
...
max_allowed_packet = 64M
wait_timeout = 28800

No php.ini você tem de aumentar o valor da variável max_execution_time:

max_execution_time = 120

Restarte o SGBD.

Os valores acima são sugeridos, especialmente o tempo de execução. Para referências consulte este link:

http://dev.mysql.com/doc/refman/5.0/en/gone-away.html

Mande retorno.

Contagem das avaliações:  -
Em resposta à Márcio Benedito

Re: Erro ao ler a base de dados

por Gedeon J Lidório, Jr -

Oi Márcio, obrigado pela resposta.

Vou fazer as modificações e postar aqui.

Abraço,

Gedeon

Contagem das avaliações:  -
Em resposta à Gedeon J Lidório, Jr

Re: Erro ao ler a base de dados

por Gedeon J Lidório, Jr -

Fiz alterações, como me indicou Márcio, e por fim também fiz a atualização para o 2.6.2, mas está dando uma mensagem, veja abaixo:

Cache definitions reparsed causing cache reset in order to locate definition. You should bump the version number to ensure definitions are reprocessed.

  • line 427 of /cache/classes/factory.php: call to debugging()
  • line 191 of /cache/classes/factory.php: call to cache_factory->create_definition()
  • line 174 of /cache/classes/loaders.php: call to cache_factory->create_cache_from_definition()
  • line 70 of /lib/classes/string_manager_standard.php: call to cache::make()
  • line 6703 of /lib/moodlelib.php: call to core_string_manager_standard->__construct()
  • line 6831 of /lib/moodlelib.php: call to get_string_manager()
  • line 7582 of /lib/moodlelib.php: call to get_string()
  • line 877 of /lib/setup.php: call to moodle_setlocale()
  • line 27 of /config.php: call to require_once()
  • line 26 of /course/index.php: call to require_once()

Sabe o que fazer com isso? Pelo que li afetava apenas o 2.5, mas ao que parece afeta também o 2.6

Abraço,

Gedeon

Contagem das avaliações:  -
Em resposta à Márcio Benedito

Re: Erro ao ler a base de dados

por Kleber Pereira -

Olá Márcio,

Será que você poderia me auxiliar com o seguinte erro:

Erro ao gravar na base de dados

Outras informações sobre este erro

Debug info: Column 'identifier' cannot be null
INSERT INTO mdl_scorm_scoes (identifier,scorm,organization,title,parent,launch,scormtype,sortorder) VALUES(?,?,?,?,?,?,?,?)
[array (
0 => NULL,
1 => '4',
2 => '',
3 => 'Módulo II - Planejamento para implantação',
4 => '/',
5 => '',
6 => '',
7 => 1,
)]
Error code: dmlwriteexception
Stack trace:
  • line 444 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1122 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 273 of /mod/scorm/datamodels/aicclib.php: call to mysqli_native_moodle_database->insert_record()
  • line 282 of /mod/scorm/locallib.php: call to scorm_parse_aicc()
  • line 248 of /mod/scorm/lib.php: call to scorm_parse()
  • line 478 of /course/modlib.php: call to scorm_update_instance()
  • line 268 of /course/modedit.php: call to update_moduleinfo()
Output buffer: <br />< b>Notice</b>: Undefined property: stdClass::$id in <b>/home/furlani/public_html/ead/mod/scorm/datamodels/aicclib.php</b> on line <b>257</b><br /> 
 
Grato
Contagem das avaliações:  -
Em resposta à Kleber Pereira

Re: Erro ao ler a base de dados

por Kleber Pereira -

Caros!

Na verdade era um erro meu mesmo! (pra variar!!!)

Utilizo um programa para gerar o scorm e na verdade o programa não estava configurado de forma correta.

Acertei as configurações e problema resolvido.

Muito obrigado pela atenção e grande abraço!

Contagem das avaliações:  -
Em resposta à Kleber Pereira

Re: Erro ao ler a base de dados

por Clayton Crabtree -

Você se lembra o arquivo que você teve que mudar para fazer o erro ir embora? Estou tendo o mesmo problema. 

Qualquer coisa que você é capaz de se lembrar vai ajudar.

Obrigado,

Clayton

Contagem das avaliações:  -