Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15408410
D16586.id39925.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D16586.id39925.diff
View Options
diff --git a/src/applications/config/check/PhabricatorMySQLSetupCheck.php b/src/applications/config/check/PhabricatorMySQLSetupCheck.php
--- a/src/applications/config/check/PhabricatorMySQLSetupCheck.php
+++ b/src/applications/config/check/PhabricatorMySQLSetupCheck.php
@@ -44,6 +44,33 @@
->addMySQLConfig('max_allowed_packet');
}
+ $max_connections = self::loadRawConfigValue('max_connections');
+
+ // A common default is 150, but we're relatively liberal about the number
+ // of connections we use and there is
+ $warning_threshold = 1024;
+ if ($max_connections < $warning_threshold) {
+ $message = pht(
+ 'MySQL is configured with a small "%s" (%d) limit, which may cause '.
+ 'connection failures. There is normally no benefit to having a small '.
+ 'connection limit, and most installs should increase it.'.
+ "\n\n".
+ 'Usually, you can raise this limit by adding this to your %s file '.
+ '(in the %s section) and then restarting %s:'.
+ "\n\n%s",
+ 'max_connections',
+ $max_connections,
+ phutil_tag('tt', array(), 'my.cnf'),
+ phutil_tag('tt', array(), '[mysqld]'),
+ phutil_tag('tt', array(), 'mysqld'),
+ phutil_tag('pre', array(), 'max_connections=32768'));
+
+ $this->newIssue('mysql.max_connections')
+ ->setName(pht('Small MySQL "%s"', 'max_connections'))
+ ->setMessage($message)
+ ->addMySQLConfig('max_connections');
+ }
+
$modes = self::loadRawConfigValue('sql_mode');
$modes = explode(',', $modes);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 19, 10:51 PM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7712136
Default Alt Text
D16586.id39925.diff (1 KB)
Attached To
Mode
D16586: Add a setup issue about small "max_connections" settings
Attached
Detach File
Event Timeline
Log In to Comment