ID: 14948
Comment by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: MSSQL related
Operating System: NT 4.0 SP5
PHP Version: 4.1.1
New Comment:
Hmm, it looks logically.
Unfortunaltelly, I still thing it's bug.
To reach state of persistent connection you need f.e.25 requests, if
the mechanism is as you tell.
But if you will measure time of openning connection, you will get f.e.
200ms first time and 5ms next time. So, the performance grows up as
expected, but off to the resources.
But your SQL server need more resources for more connections and here
you can get large lack of performance (as in my case).
And, documentation tells persistent connection is connection with the
same server,uid and pwd.
Previous Comments:
------------------------------------------------------------------------
[2002-01-14 03:51:11] [EMAIL PROTECTED]
I think this is not a bug, but Apache 1.3.x Win32 default behavior: if
you configured Apache to have 25 threads, for example, there will be 25
opened connections, because Apache seems to rotate requests among
threads. So the persistent connection pool is PER THREAD, not per
process.
IIS (and Apache 2 I think) uses a different way: it creates threads as
they are needed. Pity this creates some thread-safe issues thanks to
the clunky MSSQL DB-library...
And beware!, by default MSSQL DB-library only accepts 25 connections
per process.
------------------------------------------------------------------------
[2002-01-10 02:22:56] [EMAIL PROTECTED]
Apache 1.3.22
Win NT SP5
PHP 4.1.1, run as DLL Apache module
MSDE SQL server
mod_mssql module loaded
The web server with PHP module and SQL server are running on the same
machine.
Problem:
When opening connection to MSSQL database with mssql_pconnect, the
connections are not persistently used.
Instead, new connection is opened everytime. MSSQL sp_who2
clearlz determines this (everytime REFRESH inbrowser is called new
connection pops up).
Ondra.
------------------------------------------------------------------------
[2002-01-09 09:44:21] [EMAIL PROTECTED]
Apache 1.3.22
Win NT SP5
PHP 4.1.1, run as DLL Apache module
MSDE SQL server
mod_mssql module loaded
Problem:
When opening connection to MSSQL database with mssql_pconnect, the
connections are not persistently used.
Instead, new connection is opened everytime. See MSSQL sp_who2
results:
SPID Status DBName Command CPUTime DiskIO LastBatch
ProgramName SPID
----- ---------- ------ ---------------- ------- ------ --------------
-------------- -----
1 sleeping master SIGNAL HANDLER 0 0 01/09 15:07:02
1
2 BACKGROUND UKOLY LOCK MONITOR 0 0 01/09 15:07:02
2
3 BACKGROUND UKOLY LAZY WRITER 0 0 01/09 15:07:02
3
4 sleeping UKOLY LOG WRITER 0 0 01/09 15:07:02
4
5 sleeping UKOLY CHECKPOINT SLEEP 0 0 01/09 15:07:02
5
6 BACKGROUND UKOLY AWAITING COMMAND 0 5 01/09 15:07:02
6
7 RUNNABLE UKOLY SELECT INTO 0 169 01/09 15:41:39
MS SQL Query 7
8 sleeping UKOLY AWAITING COMMAND 0 0 01/09 15:41:34
PHP 4.0 8
9 sleeping UKOLY AWAITING COMMAND 0 0 01/09 15:41:31
PHP 4.0 9
10 sleeping UKOLY AWAITING COMMAND 0 0 01/09 15:41:37
PHP 4.0 10
11 sleeping UKOLY AWAITING COMMAND 0 0 01/09 15:41:39
PHP 4.0 11
12 sleeping UKOLY AWAITING COMMAND 0 0 01/09 15:41:40
PHP 4.0 12
13 sleeping UKOLY AWAITING COMMAND 0 0 01/09 15:41:41
PHP 4.0 13
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14948&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]