bimowidhi Posted March 10, 2009 Share Posted March 10, 2009 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[/img]. 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.. Unable to connect x.x.x.x 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. 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.. //start transaction ---> process //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... Quote Link to comment https://forums.phpfreaks.com/topic/148783-sql-server-suddenly-downed/ Share on other sites More sharing options...
corbin Posted March 11, 2009 Share Posted March 11, 2009 MSSQL Server has a max connections setting, so you might need to change that. Quote Link to comment https://forums.phpfreaks.com/topic/148783-sql-server-suddenly-downed/#findComment-782393 Share on other sites More sharing options...
bimowidhi Posted March 12, 2009 Author Share Posted March 12, 2009 Hai corbin, thx for your reply. Where can I change the max connection of MSSQL? I don;t change the max connection. I see that the default is unlimited. Thx u before.. Quote Link to comment https://forums.phpfreaks.com/topic/148783-sql-server-suddenly-downed/#findComment-782900 Share on other sites More sharing options...
corbin Posted March 12, 2009 Share Posted March 12, 2009 I mean the max connections setting on MSSQL, not under PHP. Or did you change that to unlimited? It's probably unlimited to begin with anyway. Hrmmm.... Quote Link to comment https://forums.phpfreaks.com/topic/148783-sql-server-suddenly-downed/#findComment-783272 Share on other sites More sharing options...
bimowidhi Posted March 15, 2009 Author Share Posted March 15, 2009 I check the maximum of number concurrent connection in MSSQL, and it sets to default value 0. 0=unlimited. Quote Link to comment https://forums.phpfreaks.com/topic/148783-sql-server-suddenly-downed/#findComment-784958 Share on other sites More sharing options...
corbin Posted March 15, 2009 Share Posted March 15, 2009 You don't happen to be using persistent database connections by some chance do you? Quote Link to comment https://forums.phpfreaks.com/topic/148783-sql-server-suddenly-downed/#findComment-785040 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.