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-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -222,27 +222,35 @@ public function checkMysqlSettings(): ConfigCheckItem
222
222
$desc = '';
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("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']);
226
+
} else {
227
+
$desc .= sprintf("max_connections is set to %s.\n", $vars['max_connections']);
226
228
}
227
229
228
230
if ($vars['innodb_log_file_size'] < 10 * $max_inout) {
229
231
$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));
232
+
$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));
233
+
} else {
234
+
$desc .= sprintf("innodb_log_file_size is set to %s. \n", Utils::printsize((int)$vars['innodb_log_file_size']));
231
235
}
232
236
233
237
$tx = ['REPEATABLE-READ', 'SERIALIZABLE'];
234
238
if (!in_array($vars['tx_isolation'], $tx)) {
235
239
$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));
240
+
$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));
241
+
} else {
242
+
$desc .= sprintf("transaction isolation level is set to %s.\n", $vars['tx_isolation']);
237
243
}
238
244
239
245
$recommended_max_allowed_packet = 16*1024*1024;
240
246
if ($vars['max_allowed_packet'] < 2*$max_inout) {
241
247
$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));
248
+
$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