Skip to content

Added max connection check#2

Open
yazynin wants to merge 3 commits into
gleamicus:masterfrom
yazynin:master
Open

Added max connection check#2
yazynin wants to merge 3 commits into
gleamicus:masterfrom
yazynin:master

Conversation

@yazynin

@yazynin yazynin commented May 2, 2019

Copy link
Copy Markdown

Added max connection check

@gleamicus gleamicus left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really happy to see this getting some use! This looks good, but I've added some notes with a few tweaks to make it more flexible for other users (if there are any).

Comment thread mysqlchk.service
After=mariadb.service

[Service]
ExecStart=/usr/bin/mysqlchk

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have a way to pass arguments to mysqlchk so people can override the default settings. How about using EnvironmentFile and passing something like $MYSQLCHK_ARGS on this line.

We should also drop privileges to nobody or something, there's no reason for this to run as root.

Comment thread mysqlchk.go
return
}

if maxConn <= (connUsed + 10) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add runtime flags for this feature. Either one to enable connection count checking and another to set the limit (10 by default), or just a limit (0 by default, meaning the check is disabled).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants