fix(macos): stabilization with connection pool

This commit is contained in:
Alexey Kasyanchuk 2018-08-06 04:49:07 +03:00
parent e77775794f
commit 25a3d8b6dd

View File

@ -115,7 +115,8 @@ const expand = (sphinx) => {
const pool = () => {
let sphinx = mysql.createPool({
connectionLimit: config.sphinx.connectionLimit,
// bug under mac with some problems on big connection size, limit this to very low value on mac os x
connectionLimit: process.platform === 'darwin' ? 3 : config.sphinx.connectionLimit,
host : config.sphinx.host,
port : config.sphinx.port
});