ID:               32854
 Comment by:       contact at isi-developpement dot com
 Reported By:      gerritgiliomee at hotmail dot com
 Status:           No Feedback
 Bug Type:         MSSQL related
 Operating System: Windows 2000 sp4
 PHP Version:      5.0.4
 Assigned To:      fmk
 New Comment:

Dear all,

We use Apache 2, PHP 5.1.0, MS SQL2000 up-to-date, Windows XP SP2
French up-to-date.

The mssql_pconnect() function seem to not use the same connection each
time it is used.

If we open a web page with 3 iframes contening each one a connection to
the database, there are 3 connections openned on the web server.

In fact, after using the web server, we obtain the classic error
message "Warning: mssql_pconnect() [function.mssql-pconnect]: Unable to
connect to server: servername"
The only way is to restart Apache.

Have a good day to all.

Laurent.


Previous Comments:
------------------------------------------------------------------------

[2006-04-18 07:27:54] cobus at revotxt dot co dot za

Hi,

We got the same problem using PHP 5.1.2 on Windows 2003 SP1, connecting
to MS SQL2000 using mssql_connect() or PDO_ODBC.

We've had this problem (with mssql_connect) since PHP 4.3.10, so please
don't tell us to use the latest snapshot unless you know for a fact that
this problem has been addressed.

We have three IIS machines and one database machine in a lab. After
putting pressure on one of the IIS machines, we got it in a state that
it won't make any new database connections whereas the others IIS
machines communicate fine. This problem is very difficult to reproduce
in the lab.

We also switched the code (while not restarting IIS) to use PDO_ODBC to
connect to the same database server. Here we received the same result.
The one machine was still "hung" and not making database connections.

We tried getting more information with mssql_get_last_message() but got
an empty string, and from the exception that PDO throws just this:
"SQLSTATE[] SQLConnect: 0"

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

[2005-11-14 01:00:02] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2005-11-07 00:00:15] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



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

[2005-04-27 13:09:17] gerritgiliomee at hotmail dot com

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 this bug report at http://bugs.php.net/?id=32854&edit=1

Reply via email to