PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WDxx] Timeout to database
[WDxx] Timeout to database
Iniciado por guest, 10,may. 2015 10:23 - 6 respuestas
Publicado el 10,mayo 2015 - 10:23
Hi,

this is more a customer Problem than a windev Problem, but as it affects my app, I would like to know your opinion.

Data Access is on Server (MSSQL via OLEDB). 99% of all installations are working out of the box.

So now one of my customers set up a new pc, and since then I get a timeout error from MSSQL when starting my app. Started a simplified version of my app (just a subset of windows, but same code), it takes around 10+ seconds for the first reaction on a query (a very simple one with less data on a real small table). After that access all consecutive working is as fast as ever.

So my idea is, that any other program on the pc delays the execution of the first Access, maybe Virus scanner or whatever which takes so much the longer as the hugeness of my app is.

Unfortunately the admin of the System is not very cooperative, mentioning that he did not change anything but the hardware, so I want to be prepared with some advises to tell him where to search.

Any hints appreciated.

Erik
Publicado el 11,mayo 2015 - 09:23
Hi,

now I have stopped Kaspersky on the Client.
Still the same.
Takes about 40 seconds for the first access.

Erik
Publicado el 11,mayo 2015 - 09:24
Hi Erik,

You can add the "WD Command Timeout" additional parameter to your connection string to change the default time-out setting:
IF HDescribeConnection(::DB_Connection..Caption,::DB_UserName,::DB_Password,::DB_Server,::DB_Name,hOledbSQLServer,hOReadWrite,"WD Command Timeout ="+::DB_TimeOut) THEN
Cheers,

Peter H.
Publicado el 11,mayo 2015 - 12:16
Hi Peter,

thanks for the info. I have used this timeout since years and set it to '0' which should mean endless.

Any ideas whether this may be a bug, so using a real value may be better?

Greetings

Erik
Publicado el 11,mayo 2015 - 14:14
Erik

Your problem could be one as below:

1. Firewall settings
2. wrong IIS URL
3. private LAN and public LAN traffic coming in and out thus causing
time delay to reach your destination
4 wrong DNS pointers to your router
5 wrong NAT mappings between your server IP and private/public IP

Try private (your defined) LAN Server IP, eg 192.168.1.nn instead of your
real public IP from your ISP.

HTH

King
Publicado el 11,mayo 2015 - 14:49
One more thing pls also chk below link to see if it helps:

<a class="ExternalLink" rel="nofollow" target="_blank" href="https://support.microsoft.com/en-us/kb/2879704/">https://support.microsoft.com/en-us/kb/2879704/</a>

Regs

King
Publicado el 11,mayo 2015 - 18:43
Hi all,

thanks for all the hints, which finally lead to a blog with the solution:

<a class="ExternalLink" rel="nofollow" target="_blank" href="https://kromey.us/2011/06/microsoft-sql-server-2008-times-out-on-first-connection-attempt-447.html">https://kromey.us/2011/06/microsoft-sql-server-2008-times-out-on-first-connection-attempt-447.html</a>

This describes exactly what I encountered and the solution was the same.
As there are several mssql Servers running, the one for me did not use the Standard ports and therefore the port was not open in the Firewall.

The weird thing is that always the second access after starting any app is successful, which will lead all thoughts into hell.

Greetings

Erik