Bug #12084: pg_close cause a lot of sockets in TIME_WAIT state
| From: | gianpaolo at preciso dot net | Date: | Thu, 12 Jul 2001 06:42:29 +0000 |
| Subject: | Bug #12084: pg_close cause a lot of sockets in TIME_WAIT state | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-59785@lists.php.net to get a copy of this message | ||
From: gianpaolo@preciso.net
Operating system: Debian 2.2
PHP version: 4.0.6
PHP Bug Type: PostgreSQL related
Bug description: pg_close cause a lot of sockets in TIME_WAIT state
php-4.0.6
postgres 7.1.2
I noticed a lot of sockets leaved in TIME_WAIT state in our application. so
I worte a simple script
<pre>
for ($i = 0 $i < 100 ; $i++){
$db = pg_open ("some string");
pg_close($db);
}
<pre>
After that I noticed around 200 sockets in TIME _WAIT state. If I omit the
pg_close statement averything works fine (and is considerably faster).
The same thing happens if I do a query before reopen a connection.
This bug is not reproducible with postgres 7.0.x
Thanks and goodbye
--
Edit bug report at: http://bugs.php.net/?id=12084&edit=1