#35217 [NEW]: mssql.max_procs strange behavoiur

From: Date: Mon, 14 Nov 2005 15:34:48 +0000
Subject: #35217 [NEW]: mssql.max_procs strange behavoiur
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-88153@lists.php.net to get a copy of this message
From:             vovik at getart dot ru
Operating system: RHEL 4
PHP version:      4.4.1
PHP Bug Type:     MSSQL related
Bug description:  mssql.max_procs strange behavoiur

Description:
------------
When I try to limit maximum number of MS SQL open connections via php.ini
it doesn't work properly. It doesn't work at all. Instead of this,
connections actually established, but some error messages (from FreeTDS ?)
appeared on every mssql_connect() above mssql.max_procs.

I've added sleep() to end of script for checking number of connections on
SQL server side and in example above it is 30.

Reproduce code:
---------------
<?php

// mssql.max_procs set to 26 in php.ini

$links = array();
for ($k = 0; $k < 30; ++$k) {
  $link = mssql_connect("mssqlserver", "xxx", "yyy", true);
  if (!$link) {
    exit("Connect failed.");
  }
  $links[] = $link;
}

sleep(20);

?>


Expected result:
----------------
PHP warning: Too many open links (26)
Connect failed.

Actual result:
--------------
(on stderr)
Max connections reached, increase value of TDS_MAX_CONN
Max connections reached, increase value of TDS_MAX_CONN
Max connections reached, increase value of TDS_MAX_CONN
Max connections reached, increase value of TDS_MAX_CONN


-- 
Edit bug report at http://bugs.php.net/?id=35217&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=35217&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35217&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35217&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=35217&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=35217&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=35217&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=35217&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=35217&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=35217&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=35217&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=35217&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=35217&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=35217&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=35217&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=35217&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=35217&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=35217&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=35217&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=35217&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=35217&r=mysqlcfg


Thread (6 messages)

« previous php.bugs (#88153) next »