#32854 [NEW]: mssql_pconnect fails under load and doesn't recover
| From: | gerritgiliomee at hotmail dot com | Date: | Wed, 27 Apr 2005 11:09:19 +0000 |
| Subject: | #32854 [NEW]: mssql_pconnect fails under load and doesn't recover | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-78277@lists.php.net to get a copy of this message | ||
From: gerritgiliomee at hotmail dot com
Operating system: Windows 2000 sp4
PHP version: 5.0.4
PHP Bug Type: MSSQL related
Bug description: mssql_pconnect fails under load and doesn't recover
Description:
------------
Using mssql_pconnect to connect to a MS SQL2000 server on another box.
Everything works a treat until I put some load on. When I go above a
certain threshhold, e.g. using Apache Benchmark, 20 concurrent users, 500
requests, mssql_pconnect fails with this error:
"Warning: mssql_pconnect() [function.mssql-pconnect]: Unable to connect to
server: servername"
This is understandable as things will break above a certain point,
however, after this happens, mssql_pconnect seems to have hung, even if I
change the connection details, or try using mssql_connect, I still get the
same error.
The only thing that resolves it is restarting IIS.
Using Win2K (sp4), IIS5, MS SQL 200 (sp2).
PS: I have made sure I'm using the right version of ntwdblib.dll.
It's also worth noting that my phpinfo() reports "Library Version: 7.0"
instead of the presumed 8.0. Not sure if this is connected to the SQL
version though.
I've toggled around and have these mssql settings in my php.ini
[MSSQL]
; Allow or prevent persistent links.
mssql.allow_persistent = On
; Maximum number of persistent links. -1 means no limit.
mssql.max_persistent = 100
; Maximum number of links (persistent+non persistent). -1 means no
limit.
mssql.max_links = 100
; Minimum error severity to display.
mssql.min_error_severity = 10
; Minimum message severity to display.
mssql.min_message_severity = 10
; Compatability mode with old versions of PHP 3.0.
mssql.compatability_mode = Off
; Connect timeout
mssql.connect_timeout = 5
; Query timeout
mssql.timeout = 60
; Valid range 0 - 2147483647. Default = 4096.
mssql.textlimit = 4096
; Valid range 0 - 2147483647. Default = 4096.
mssql.textsize = 4096
; Limits the number of records in each batch. 0 = all records in one
batch.
mssql.batchsize = 0
; Specify how datetime and datetim4 columns are returned
; On => Returns data converted to SQL server settings
; Off => Returns values as YYYY-MM-DD hh:mm:ss
;DEV - used to be completely commented out
mssql.datetimeconvert = Off
; Use NT authentication when connecting to the server
mssql.secure_connection = Off
; Specify max number of processes. Default = 25
mssql.max_procs = 25
Any help will be much appreciated.
--
Edit bug report at http://bugs.php.net/?id=32854&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32854&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32854&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32854&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32854&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32854&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32854&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32854&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32854&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32854&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32854&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32854&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32854&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32854&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32854&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32854&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32854&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32854&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32854&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32854&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32854&r=mysqlcfg