You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This helps quickly inspecting settings, in my case for example
the MySQL transaction isolation level.
We should probably do this for all configuration settings.
Copy file name to clipboardExpand all lines: webapp/src/Service/CheckConfigService.php
+13-7Lines changed: 13 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -219,37 +219,43 @@ public function checkMysqlSettings(): ConfigCheckItem
219
219
$max_inout = max($max_inout, $output_limit);
220
220
221
221
$result = 'O';
222
-
$desc = '';
222
+
$desc = sprintf("max_connections is set to %s.\n", $vars['max_connections']);
223
223
if ($vars['max_connections'] < 300) {
224
224
$result = 'W';
225
-
$desc .= sprintf("MySQL's max_connections is set to %s. In our experience you need at least 300, but better 1000 connections to prevent connection refusal during the contest.\n", $vars['max_connections']);
225
+
$desc .= sprintf("In our experience you need at least 300, but better 1000 connections to prevent connection refusal during the contest.\n");
226
226
}
227
227
228
228
if ($vars['innodb_log_file_size'] < 10 * $max_inout) {
229
229
$result = 'W';
230
-
$desc .= sprintf("MySQL's innodb_log_file_size is set to %s. You may want to raise this to 10x the maximum of the test case size and output (storage) limit (now %s).\n", Utils::printsize((int)$vars['innodb_log_file_size']), Utils::printsize($max_inout));
230
+
$desc .= sprintf("innodb_log_file_size is set to %s. You may want to raise this to 10x the maximum of the test case size and output (storage) limit (now %s).\n", Utils::printsize((int)$vars['innodb_log_file_size']), Utils::printsize($max_inout));
231
+
} else {
232
+
$desc .= sprintf("innodb_log_file_size is set to %s. \n", Utils::printsize((int)$vars['innodb_log_file_size']));
231
233
}
232
234
233
235
$tx = ['REPEATABLE-READ', 'SERIALIZABLE'];
234
236
if (!in_array($vars['tx_isolation'], $tx)) {
235
237
$result = 'W';
236
-
$desc .= sprintf("MySQL's transaction isolation level is set to %s. You should set this to %s to prevent data inconsistencies.\n", $vars['tx_isolation'], implode(' or ', $tx));
238
+
$desc .= sprintf("transaction isolation level is set to %s. You should set this to %s to prevent data inconsistencies.\n", $vars['tx_isolation'], implode(' or ', $tx));
239
+
} else {
240
+
$desc .= sprintf("transaction isolation level is set to %s.\n", $vars['tx_isolation']);
237
241
}
238
242
239
243
$recommended_max_allowed_packet = 16*1024*1024;
240
244
if ($vars['max_allowed_packet'] < 2*$max_inout) {
241
245
$result = 'E';
242
-
$desc .= sprintf("MySQL's max_allowed_packet is set to %s. You may want to raise this to about twice the maximum of the test case size and output (storage) limit (currently %s).\n", Utils::printsize((int)$vars['max_allowed_packet']), Utils::printsize($max_inout));
246
+
$desc .= sprintf("max_allowed_packet is set to %s. You may want to raise this to about twice the maximum of the test case size and output (storage) limit (currently %s).\n", Utils::printsize((int)$vars['max_allowed_packet']), Utils::printsize($max_inout));
0 commit comments