ID:               29074
 User updated by:  david dot blair at nsi1 dot com
 Reported By:      david dot blair at nsi1 dot com
 Status:           Open
 Bug Type:         MSSQL related
 Operating System: MS 2003
 PHP Version:      4.3.7
 New Comment:

Charles, this doesn't explain why newer versions of PHP cause the error
more frequently than older versions, when everything else about our
systems remains the same. This also doesn't explain why PHP is the only
thing having issues that contacts my SQL server.

I'll try your work-around tomorrow and monitor the server for a few
weeks to see what happens. It's a step in the right direction to
finding a solution if it does help, but I still see it as a
work-around, not a solution.


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

[2004-09-21 23:36:13] phpbugreport at workboy dot com

This bug should probably be closed.  The problem is on the MSSQL end
and ban be resolved by changing the value of the winsocklistenbacklog
registry entry.  For those who are experiencing this problem, please
see http://support.microsoft.com/default.aspx?kbid=328476

I don't know why this also affects mssql_select_db, but they do appear
to go together.

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

[2004-09-13 00:42:39] phpbugreport at workboy dot com

Upgrading seems to make things worse.  I upgraded to freetds-0.62.4,
php-4.3.9RC2 (4.3.8 has a compile issue with freetds-0.62.4 according
to bug reports), and apache 1.3.31.

Now in addition to mssql_connect failures I also get mssql_select_db
failures for one of our busier databases.

Could it be that php/freetds is getting too fast and giving up before a
response is received from SQL 2000?

Charles Bennigton
Oddcast, Inc.

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

[2004-09-11 22:13:08] phpbugreport at workboy dot com

We are currently running apache_1.3.28, freetds-0.61.2 and php-4.3.3 on
linux 2.4.x kernels and experiencing the same problem connecting to a
SQL 2000E SP3 database.  Modifying our PHP db connection classes to
immediately try mssql_connect again when it fails produces the desired
results most of the time.  However not always.

I will be upgrading to the latest and greatest in the current major
version for all of the components on the Linux side and testing more. 
I will post a follow up then.

Charles Bennington
Oddcast, Inc.

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

[2004-08-31 16:13:34] david dot blair at nsi1 dot com

I've never had Apache hang before but I'm also not running through
TDS.

I just tried upgrading the production server to 5.0.1 last night. I've
been running 5.0.0 on the development server and 5.0.1 on my laptop for
two weeks/one week with no problems.

The database connection failed 6 times last night after we brought
everything back up. After 2 more failures this morning I rolled
everything back. 

Oh hell, I just remembered I left php_mssql.dll from the 5.0.1 build in
the windows directory...I think I'm going to leave it in there and see
what happens...two of us have tested the system with no crashes so
far...

More info as it comes in...

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

[2004-08-27 01:43:36] jochen dot daum at cabletalk dot co dot nz

Hi,

I have the same experience with mssql_select_db. I use PHP 4.3.2 as a
module with FreeTDS. The mssql extension is patched though with a
datetime extension that reads the milliseconds as well (as mentioned in
some early bugs)

The problem does not seem to occur with heavy load, but after a certain
amount of mssql_select_db. According to the documentation:

"In case a second call is made to mssql_connect() with the same
arguments, no new link will be established, but instead, the link
identifier of the already opened link will be returned."
(mssql_connect) and "Every subsequent call to mssql_query() will be
made on the active database." (mssql_select_db)

I have modified my database access layer to call mssql_select_db()
before each mssql_query().

After a number of mssql_select_db, I get an instant failure. Retrying
helps for some more queries, but then the process hangs with Apache
running at 100%.

HTH, Jochen

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/29074

-- 
Edit this bug report at http://bugs.php.net/?id=29074&edit=1

Reply via email to