Page MenuHomePhabricator

MySQL connections increase too many to connect after I configured commit hook and Herald
Closed, WontfixPublic

Description

remote: This push was rejected by custom hook script 'pre-receive':
remote:
remote: +---------------------------------------------------------------+
remote: | * * * PUSH REJECTED BY EVIL DRAGON BUREAUCRATS * * * |
remote: +---------------------------------------------------------------+
remote: \
remote: \ ^ /^
remote: \ / \ \
remote: \ |\___/| / \
.\
remote: \ /V V \__ / | \ \ *----*
remote: / / \/_/
| \ \ \ |
remote: @___@` \/_ | \ \ \/\ \
remote: 0/0/| \/_
| \ \ \ \
remote: 0/0/0/0/| \/ | \ \ | |
remote: 0/0/0/0/0/_|_ / (
| \ _\ | /
remote: 0/0/0/0/0/0/`/,_ _ _/ ) ; -. | _ _\.-~ / /
remote: ,-} _ *-.|.-~-. .~ ~
remote: \ \__/ `/\ / ~-. _ .-~ /
remote: \____(Oo) *. } { /
remote: ( (--) .----~-.\ \-` .~
remote: \\ \ DENIED! /.----..< \ _ -~
remote: \\ /-._ _ _ _ _ _ _{^ - - - - ~
remote:
remote:
remote: This push was rejected by custom hook script 'pre-receive':
remote:
remote: +---------------------------------------------------------------+
remote: | * * * PUSH REJECTED BY EVIL DRAGON BUREAUCRATS * * * |
remote: +---------------------------------------------------------------+
remote: \
remote: \ ^ /^
remote: \ / \ \
remote: \ |\
_/| / \ .\
remote: \ /V V \__ / | \ \ *----*
remote: / / \/_/
| \ \ \ |
remote: @___@` \/_ | \ \ \/\ \
remote: 0/0/| \/_
| \ \ \ \
remote: 0/0/0/0/| \/ | \ \ | |
remote: 0/0/0/0/0/_|_ / (
| \ _\ | /
remote: 0/0/0/0/0/0/`/,_ _ _/ ) ; -. | _ _\.-~ / /
remote: ,-} _ *-.|.-~-. .~ ~
remote: \ \__/ `/\ / ~-. _ .-~ /
remote: \____(Oo) *. } { /
remote: ( (--) .----~-.\ \-` .~
remote: \\ \ DENIED! /.----..< \ _ -~
remote: \\ /-._ _ _ _ _ _ _{^ - - - - ~
remote:
remote:
remote: This push was rejected by custom hook script 'pre-receive':
remote:
remote: +---------------------------------------------------------------+
remote: | * * * PUSH REJECTED BY EVIL DRAGON BUREAUCRATS * * * |
remote: +---------------------------------------------------------------+
remote: \
remote: \ ^ /^
remote: \ / \ \
remote: \ |\
_/| / \ .\
remote: \ /V V \__ / | \ \ *----*
remote: / / \/_/
| \ \ \ |
remote: @___@` \/_ | \ \ \/\ \
remote: 0/0/| \/_
| \ \ \ \
remote: 0/0/0/0/| \/ | \ \ | |
remote: 0/0/0/0/0/_|_ / (
| \ _\ | /
remote: 0/0/0/0/0/0/`/,_ _ _/ ) ; -. | _ _\.-~ / /
remote: ,-} _ *-.|.-~-. .~ ~
remote: \ \__/ `/\ / ~-. _ .-~ /
remote: \____(Oo) *. } { /
remote: ( (--) .----~-.\ \-` .~
remote: __\\ \ DENIED! /.----..< \ _ -~
remote: \\ /-._ _ _ _ _ _ _{^ - - - - ~
remote:
remote:
remote: This push was rejected by custom hook script 'pre-receive':
remote:
remote: [2015-12-08 07:16:18] EXCEPTION: (AphrontConnectionQueryException) Attem
pt to connect to root@127.0.0.1 failed with error #1040: Too many connections. a
t [<phutil>/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection
.php:72]
remote: arcanist(head=master, ref.master=4a680c762b2e), phabricator(head=master,
ref.master=ef820ed1ee29), phutil(head=master, ref.master=a8143ced646d)
remote: #0 AphrontMySQLiDatabaseConnection::connect() called at [<phutil>/src/
aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:97]
remote: #1 AphrontBaseMySQLDatabaseConnection::establishConnection() called at
[<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnecti
on.php:120]
remote: #2 AphrontBaseMySQLDatabaseConnection::requireConnection() called at [
<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection
.php:156]
remote: #3 AphrontBaseMySQLDatabaseConnection::executeRawQuery(string) called
at [<phutil>/src/xsprintf/queryfx.php:6]
remote: #4 queryfx(AphrontMySQLiDatabaseConnection, string)
remote: #5 call_user_func_array(string, array) called at [<phutil>/src/aphront
/storage/connection/AphrontDatabaseConnection.php:28]
remote: #6 AphrontDatabaseConnection::query(string) called at [<phutil>/src/ap
hront/storage/connection/AphrontDatabaseConnection.php:66]
remote: #7 AphrontDatabaseConnection::openTransaction() called at [<phabricato
r>/src/infrastructure/storage/lisk/LiskDAO.php:1461]
remote: #8 LiskDAO::openTransaction() called at [<phabricator>/src/application
s/diffusion/engine/DiffusionCommitHookEngine.php:164]
remote: #9 DiffusionCommitHookEngine::execute() called at [<phabricator>/scrip
ts/repository/commit_hook.php:133]
remote:
remote:
remote:
remote:
remote:
remote:
remote:
remote:
remote:
remote:
remote:
remote:
remote:
remote:
remote:


And I use MySQL to see the connections:

mysql> show status like '%onn%';
+--------------------------+-------+

Variable_nameValue

+--------------------------+-------+

Aborted_connects129
Connections1702
Max_used_connections152
Ssl_client_connects0
Ssl_connect_renegotiates0
Ssl_finished_connects0
Threads_connected3

+--------------------------+-------+
7 rows in set (0.00 sec)

and the Connections increase all the time after you recall this command

Event Timeline

• universeroc raised the priority of this task from to Needs Triage.
• universeroc updated the task description. (Show Details)
• universeroc changed the edit policy from "All Users" to "Custom Policy".
• universeroc added a project: Bug Report.
• universeroc added a subscriber: • universeroc.

Sorry to disturb everybody, and I find the reason that, in my hooks of repo, there is also one pre-receive hook script.

it looks like:

hooks/pre-receive-phabricator.d/pre-receive
repo/hooks/pre-receive

after I remove repo/hooks/pre-receive, I could push successfully

What was the push operation you tryed to do ? By default phabricator prevents dangerous changes (like history rewrite or other operations in which you have to use --force) but this can be disable in repository preferences..