开发者

Delay at end of page load when using mssql

I have a working installation of mssql, php on Windows 2003, SQL Server 2008 express. I finally got the connection working right, but now the connection to the database is really quick but its disconnection is slow. This delays the final loading of my page by about 5 seconds, even though all the page is loaded in a few milliseconds.

I think this is something to do with php/mssql not releasing the connection to the database quickly. The main problem here is that my javascript yui scripts wont run until the page thinks its fully lo开发者_如何学Caded.

I've tried closing the connection immediately I don't need it to no avail.

Anyone know what setting I could set to fix it?


You can always call PHP flush() function to make any content generated by the script that is still in PHP or Apache buffer to be flushed.

Also, if you used mssql_pconnect to establish persistent connections to the MS SQL database, the connection is never closed when the PHP script exists, so I suppose mssql_close will not hold your script anymore.


I think the problem turned out to be incorrect DNS entries. I changed the upstream DNS server being checked by the server and the lag went away.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜