views:

97

answers:

3

I have a standard php app that uses SQL Server as the back-end database. There is a serious delay in response for each page I access. This is my development server, so its not an issue with the live setup, but it is really annoying for working on the system.

I have a 5 - 8 second delay on each page.

  • I am running SqlServer 2000 Developer Edition on a Virtual Machine (Virtual PC).
  • I have installed SqlServer on my development machine but get the same delay.
  • I have isolated the issue to the call to mssql_connect (calling mssql_pconnect has no effect)

  • It is a networking issue on how I have set up (or not set up, since I didn't really change default config) SQL server. It's not a strictly a programming issue but I thought I might get some valuable feedback here.

Can anyone tell me if there is a trick, specific set of protocols, registry setting, something that will kill this delay?

+1  A: 

Hi,

I came across network issues when running virtual pc, everything network related is slow, try adding this entry on your registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

  • Create new DWORD value named DisableTaskOffload and set its value to 1.

  • Restart the computer.

It worked for me, source.

Rodrigo
Thanks, but doesn't seem to have made any difference.
Toby Allen
You could try to test out if anything else network related is slow, try transferring a file, if it goes slow then it's virtual pc related, for me, i migrated to virtualbox.
Rodrigo
A: 

Is it perhaps a DNS issue? I know that MySQL does a reverse DNS lookup on each login (not each connection). If you don't have a reverse dns record for your server (or your dns is slow) it can cause a major delay at login. There's an option in MySQL to disable that. I'm not sure about SQL Server, but I'd assume it may be doing something similar...

ircmaxell
+1  A: 

I remember the same problem, but forgot, how we have solve it.

To clarify please specify exact connect strings, your SQLserver versions and also try to start this old good utility c:\WINDOWS\system32\cliconfg.exe, which is also can bring some light.

Yes, I know, it's from 2k, but guys at m$ don't like to create client tools from scratch.

Also try to get "right" mssql client dlls for PHP.

Alexander