Skip to content

Prevent 'Aborted connection' warnings from the DoctrineConnectionHealthCheck#3

Merged
MKodde merged 2 commits intomasterfrom
feature/support-custom-query
Sep 12, 2018
Merged

Prevent 'Aborted connection' warnings from the DoctrineConnectionHealthCheck#3
MKodde merged 2 commits intomasterfrom
feature/support-custom-query

Conversation

@pablothedude
Copy link
Copy Markdown
Contributor

@pablothedude pablothedude commented Sep 11, 2018

Aborted connection warnings where spawned into the messages log on every call to the health endpoint. Many sleeping mysql tasks remained unclosed.

To resolve this issue, the DoctrineConnectionHealthCheck needed to be changed. The previously used execute statement turned out to cause the problem. Using the query method solved the problem.

@pablothedude pablothedude requested a review from MKodde September 11, 2018 12:35
@pablothedude pablothedude changed the title Close connection also on success Close healthcheck connection also on success Sep 11, 2018
@thijskh
Copy link
Copy Markdown
Member

thijskh commented Sep 11, 2018

In my test, does not seem to have the desired effect.

@MKodde MKodde force-pushed the feature/support-custom-query branch from 5f304d8 to 4e9a929 Compare September 11, 2018 15:10
@tvdijen
Copy link
Copy Markdown
Contributor

tvdijen commented Sep 11, 2018

Nope, indeed still loads of aborted db-connections from engine, middleware and gateway:

Sep 11 20:14:23 database-1 mysqld: 2018-09-11 20:14:23 1702 [Warning] Aborted connection 1702 to db: 'engineblock' user: 'engineblock' host: '10.2.16.3' (Got an error reading communication packets)
Sep 11 20:14:51 database-1 mysqld: 2018-09-11 20:14:51 1703 [Warning] Aborted connection 1703 to db: 'gateway' user: 'gateway' host: '10.2.16.3' (Got an error reading communication packets)
Sep 11 20:15:19 database-1 mysqld: 2018-09-11 20:15:19 1705 [Warning] Aborted connection 1705 to db: 'middleware' user: 'middleware' host: '10.2.16.2' (Got an error reading communication packets)

Prevent sleeping connections in the database which get aborted
eventually. This in order to prevent growing logs.
@MKodde MKodde changed the title Close healthcheck connection also on success Prevent 'Aborted connection' warnings from the DoctrineConnectionHealthCheck Sep 12, 2018
@pablothedude
Copy link
Copy Markdown
Contributor Author

We've tested the issue on the test environment and could reproduce the problem there. The problem was that the wrong method was used and therefore the connections were not properly closed. This fix should now address this issue.

@thijskh
Copy link
Copy Markdown
Member

thijskh commented Sep 12, 2018

Yes, works better now!

@MKodde
Copy link
Copy Markdown
Member

MKodde commented Sep 12, 2018

@pablothedude, would you be so kind to install this change in:

  • Stepup-*
  • SP Dashboard
  • User lifcecycle
  • Engine (even tho this change was already fixed in the overloaded Checker)

See: https://www.pivotaltracker.com/story/show/158906723

@MKodde MKodde merged commit 0c1fe3a into master Sep 12, 2018
@MKodde MKodde deleted the feature/support-custom-query branch September 12, 2018 13:38
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.

4 participants