[pgsql-jp: 37464] Postgresのidleプロセスを早く消したい

Nobuaki Inamura inamuran36 @ mahikari.or.jp
2006年 8月 23日 (水) 14:55:01 JST


稲村と申します。お世話になっています。

この件に関しては同じようなものが以前も流れていましたが、答えまで流れていませんでしたので
投稿させていただきました。

以下の環境でPostgresが稼動しています。

環境
OS:Linux(Debian3.1)
DB:PostgreSQL7.4
Driver:Npgsql0.71(IDE:VisualStudio2003)

このとき、postgresのプロセスがいつまでも残ってしまい、あっという間に最大接続数に達してしまい困っています。
プログラム上で明示的にcloseしても消えません。
それがゆえに1箇所から1つのDBに31接続になったり・・という現象が起きています。

サーバ側で、もしくはプログラム側でもいいのですが、idleプロセスを削除する方法はないでしょうか?

psコマンドの結果(一部抜粋&書き換え):
-----------------------------------------------
> postgres 29815  0.0  0.4 34188 5040 ?        S    12:59   0:00 postgres: user db1 123.456.789.012 idle
> postgres 29858  0.0  2.3 34368 24332 ?       S    13:02   0:00 postgres: user db1 123.456.789.012 idle
> postgres 29883  0.0  2.7 34380 28492 ?       S    13:04   0:00 postgres: user db1 123.456.789.012 idle
> postgres 29884  0.0  0.4 34188 5104 ?        S    13:04   0:00 postgres: user db1 123.456.789.012 idle
> postgres 29885  0.0  2.7 34380 28492 ?       S    13:04   0:00 postgres: user db1 123.456.789.012 idle
> postgres 29886  0.0  0.4 34192 5068 ?        S    13:04   0:00 postgres: user db1 123.456.789.012 idle
> postgres 29903  0.0  2.0 34304 21244 ?       S    13:05   0:00 postgres: user db1 123.456.789.012 idle
> postgres 29904  0.0  0.4 34188 5148 ?        S    13:05   0:00 postgres: user db1 123.456.789.012 idle
> postgres 29905  0.0  0.4 34192 5008 ?        S    13:05   0:00 postgres: user db1 123.456.789.012 idle
> postgres 30015  0.0  0.5 34188 5200 ?        S    13:13   0:00 postgres: user db1 123.456.789.012 idle
> postgres 30016  0.0  0.5 34188 5188 ?        S    13:13   0:00 postgres: user db1 123.456.789.012 idle

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

-- 
Nobuaki Inamura : inamuran36 @ mahikari.or.jp





pgsql-jp メーリングリストの案内