Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

PG DataSource Error handler throwing memory leak warning

オープン
#746 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, nodejs, postgresql
領域
database

調査の方向性

リンクされた sandbox とその README を使用して、PostgreSQL DataSource と onError ハンドラーで MaxListenersExceededWarning を再現します。次に、connector の connection-pool release path を調査します。完了の条件は、接続が pool に返される前に、繰り返し使用しても error listener が蓄積されなくなることです。

索引モデルが issue の本文から書いたものです。

説明

bug

Steps to reproduce

  • Add onError handler in DataSource for Loopback Connector Postgresql.
  • Use DataSource on frequent manner.
  • It should throw warnings like
    (node:80014) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Client]. Use emitter.setMaxListeners() to increase limit

(More details to reproduce the issue are provided in the README.md file in the sandbox repository)

Current Behavior

It doesn't remove the attached error event listeners while releasing the connection back to pool.

Expected Behavior

It should remove attached event listener before releasing connection back to pool.

Link to reproduction sandbox

https://github.com/vinod-hansda/loopback-pg-warning

Additional information

node -e 'console.log(process.platform, process.arch, process.versions.node)' :-
darwin arm64 18.20.6

npm ls --prod --depth 0 | grep loopback :-
npm warn config production Use --omit=dev instead.
[email protected] /Users/vinodhansda/Documents/GitHub/loopback-pg-warning
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── @loopback/[email protected]
├── [email protected]

Related Issues

See Reporting Issues for more tips on writing good issues

主要言語
JavaScript
スター
118
フォーク
183
平均マージ
3日 7時間
マージ済み PR(30日)
9

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

loopbackio/loopback-connector-postgresql のほかの issue

loopbackio/loopback-connector-postgresql の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。