472,145 Members | 1,424 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

PHP SQL Server 2005 suddenly down

Hi, I'm a newbie here, and also in PHP.

Sorry for my bad English. I've walked around to find the answer of my problem, but I still can't get it.

I develop PHP 5.2.5 Application, using SQL Server 2005 database, and run in IIS 6.0.
I also use PHP SQL Server 2005 driver provides by microsoft.
My database is placed in another server.
My application is used by almost 30-40 users at the same time.
If the application is used by few users, the application works smoothly.
But, if the application is used by a lot of users (around 30), it suddenly down and show this error..


Expand|Select|Wrap|Line Numbers
  1. Array ( [0] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 2 [code] => 2 [2] => [Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2]. [message] => [Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2]. ) [1] => Array ( [0] => HYT00 [SQLSTATE] => HYT00 [1] => 0 [code] => 0 [2] => [Microsoft][SQL Native Client]Login timeout expired [message] => [Microsoft][SQL Native Client]Login timeout expired ) [2] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 2 [code] => 2 [2] => [Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. [message] => [Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. ) )
FYI, there is also another application , developed by my friend, in the same server who use the same SQL Server. When my application shows the error above, his application shows the same error. So I conclude, the error in the database.[/code]

If this happen, I restart the IIS and it backs to normal.

I guess there is something wrong with the max connection that SQL Server 2005 can accept. I assume that because I use the transaction..

Expand|Select|Wrap|Line Numbers
  1.    //start transaction
  2.      ---> process
  3.   //end transaction
Maybe, because of the long process, and also the amount of user that use the same page, the database reach max limit and then down.

I don;t know how to checked whether the database has reach max connection. I've checked the max connection that's allowed and it use default value (unlimited).

The problem makes me headache. The application has lived and I must solved this problem quickly..

Could anyone help me? Thanks before...
Mar 11 '09 #1
1 2259
ck9663
2,878 Expert 2GB
Check the timeout of your connection or your recordset. This might be more of a PHP question than a SQL Server question. Try asking help from the PHP gurus.


-- CK
Mar 12 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Ma³y Piotruœ | last post: by
42 posts views Thread by Paul | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.