Views: 8584 (Data available since 06.02.2017)
When a database query error occurs, the following error message is displayed:
The visual aspect of the message is defined by the contents of the file /bitrix/php_interface/dbquery_error.php.
Situations may happen when a site denies to reply and returns an empty page to visitors. In this case, open the file bitrix/php_interface/dbconn.php containing the database connection parameters, and set the parameter:
$DBDebug = true;
$DBType = "mysql";
$DBHost = "localhost:31006";
$DBLogin = "root";
$DBPassword = "";
$DBName = "bsm_demo";
$DBDebug = true;
$DBDebugToFile = false;
This will cause the error message to be printed. The message usually contains names of damaged tables.
Run perror.exe (can be found in mysql/bin) with the error code to get the error description:
The error 28
displays the following description:
This means that the disk on which the database is installed is out of free space.
If the database damage is the case, you are recommended to use the built-in database check and repair tool. This will allow you to restore the site functionality in the shortest possible time.
- The standard database check and repair tool only works with the MyISAM tables of MySQL.
- The check script starts from the administrative section of the site Settings > Tools > System Administration > Database Check:
If the statistics tables are damaged and you cannot open the Control Panel, you can disable gathering statistics by supplying the parameter
?no_keep_statistic_LICENSE-KEY=Y on the URL (substitute
LICENSE-KEY with your license key).
There is a possibility to use the check script and recover the database without the need to go to the administrative section.
To do so, supply the database access login and password on the URL. For example: http://www.mysite.com/bitrix/admin/repair_db.php?login=DB_Login&password=DB_Password. By default, the database access parameters are stored in /bitrix/php_interface/dbconn.php.
The following error appears on the screen:
|MySQL Query Error: ….. [Out of memory restart server and try again (needed 65528 bytes)]|
Memory size must be increased in MySQL settings.
The following MySQL parameters should be used and entered in the MySQL configuration file my.cnf:
key_buffer = 128K
max_allowed_packet = 16M
table_cache = 4
sort_buffer_size = 128K
read_buffer_size = 128K
read_rnd_buffer_size = 128K
net_buffer_length = 128K
thread_stack = 128K
MySQL will have to be reloaded after you change the parameters.