I'm running a PHP app on windows 2000 / IIS using unified ODBC to 
connect to MS-SQL. I would like to connect to the database using 
persistant connections but need to limit the total number of 
connections to avoid swamping the database. It seems that a new 
connection is created for every request made to the webserver at 
least for the first few tens of requests - presumably a new php 
thread is being created for each request.

I've tried limiting the maximum connections allowed by IIS for
the website - but this does not appear to affect the number of PHP
threads holding persistant connections to the db.
I have set odbc.max_links in the php.ini file in case it is a bug
in my program opening lots of connections but with maximum connections 
for IIS being set to 20 and max_links 4 I still end up with several
hundred database connections after a few hundred page requests.

If I was implementing this on apache (which I have much more experience
of using) I would use the MaxClients directive to achieve this...

Does anyone know how to limit the number of persistant database 
connections on windows/IIS/PHP?

cheer Simon

Simon Rees  |  [EMAIL PROTECTED]  |
ORA-03113: end-of-file on communication channel

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to