IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#21185 - 09/02/09 11:12 AM Planet Watch gets an SQL timeout
schaefer Offline
Junior Member

Registered: 09/02/09
Posts: 9
Loc: Madison, WI USA
As part of our Watch process we run a script that executes a stored procedure on another server...

Dim conn,FileName
Set conn = CreateObject("ADODB.Connection")
conn.ConnectionTimeout=240
conn.Open "DSN=FAC_PDN_PRINT;Database=fac_print_pdn;UID=facpdnprint;PWD=******;"
conn.Execute("exec FAC_Import_FACPRDD250_Interface_Files")
conn.close

This procedure creates views and then creates tables from those views.


Some times this completes fine, other times it gives a timeout message...

DEBUG: Starting plugin Run Script - 08:45:01
INFO : Run script...
ERROR: W3602 : Error 0 on line 5, column 1: Microsoft OLE DB Provider for ODBC Drivers: [Microsoft][ODBC SQL Server Driver]Timeout expired
ERROR: W3603 : Error running script.
ERROR: PlanetWatch SQL error - Production Interface build
ERROR: Run Script: W1603 : Plugin failed
DEBUG: W1602 : Stopping execution of Watch Process

I have watched the stored procedure run in SQL profiler and it starts running and then ends at different select statements (I can run this several times and it ends at different lines of the stored procedure).

The connection to SQL does not appear to be timing out because the procedure starts running fine. And Watch does not error out every time.

Is there a maximum time the connection will stay open?

Top
#21186 - 09/02/09 11:23 AM Re: Planet Watch gets an SQL timeout
Anonymous
Unregistered


Schaefer,

I see that you've already set the conn.ConnectionTimeout to 240, what happens when you push this number up to another value?

Also, have you tried running the VBScript outside of watch, by itself?

Eric.

Top
#21187 - 09/03/09 09:53 AM Re: Planet Watch gets an SQL timeout
schaefer Offline
Junior Member

Registered: 09/02/09
Posts: 9
Loc: Madison, WI USA
I have tried using various values up to 600 and get the same results.

No I had not tried the script outside of Watch. So I tried it, and get the same error.

Top
#21188 - 09/03/09 09:55 AM Re: Planet Watch gets an SQL timeout
Anonymous
Unregistered


Schaefer,

This basically means that the issue is between VBScript and SQL, and doesn't relate directly to Watch. I suggest taking a look at the following google search results for more information on how to fix this error, which is outside the scope of our support.

Regards,
Eric.

Top
#21189 - 09/03/09 11:41 AM Re: Planet Watch gets an SQL timeout
schaefer Offline
Junior Member

Registered: 09/02/09
Posts: 9
Loc: Madison, WI USA
Thank-you

After digging through the Google search and various Microsoft KB articles I found on the ASP FAQ a section on setting timeout values. It seems that the default command timeout is 30 seconds. By entering a line to increase this value the script is working again.

Top
#21190 - 09/03/09 01:36 PM Re: Planet Watch gets an SQL timeout
Anonymous
Unregistered


Glad to hear you were able to get working again!

Eric.

Top


Moderator:  cosimo, OL Newsgroup Support