プロジェクト

全般

プロフィール

Vote #78467

完了

mysql2 0.3 gem doesn't properly close connections

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Gems support_45
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
45
version_id:
128
issue_org_id:
25829
author_id:
123153
assigned_to_id:
1
comments:
3
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
43
ステータス-->[Closed]

説明

Hi,
I found that mysql2 (0.3.21) doesn't properly closing connections.

Our mysql's error logs are full of these warnings

11797 [Warning] Aborted connection 12561 to db: 'test' user: 'test' host: '127.0.0.1' (Got an error reading communication packets)
11798 [Warning] Aborted connection 12561 to db: 'test' user: 'test' host: '127.0.0.1' (Got an error reading communication packets)
11799 [Warning] Aborted connection 12561 to db: 'test' user: 'test' host: '127.0.0.1' (Got an error reading communication packets)
...

it is already fixed, but the change wasn't backported to the 0.3.x branch
https://github.com/brianmario/mysql2/issues/606

I can confirm the issue is gone after upgrading to the current version 0.4.6.

This version is still compatible with Ruby 1.9+ and it passes redmine tests. I also run our specs and it looks like everything is ok.

Notable changes:

* mysql 8 support
* prepared statements support
* connection.close/shutdown fix
* many bugfixes

Full changelog:
https://github.com/brianmario/mysql2/releases


journals

Setting target version to 3.2.7.
I have been observing a significant increase in the number of connections on my environment for years, maybe caused by this issue.

Thank you for detecting and inspecting this issue.
--------------------------------------------------------------------------------
Patch committed, thanks.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリGems support_45 にセット
  • 対象バージョン3.2.7_128 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0