473,327 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Timeout expire in windows service.

Hi all,

I am executing one stored procedure in windows service.

I set sqlcommad's CommandTimeout to 432000 which means 5 days timeout.

Still after 11th hour i am getting timeout. I am not getting if i set
timeout as 5 days why i am getting timeout before that.

Please shed some light on it.

Thanks in advance.

Jun 2 '06 #1
6 5159
Have you set your servers remote query timeout option?

sp_configure 'remote query timeout', 0
-- This sets it to infinite, otherwise replace the 0 with N,
-- where N = number of seconds to wait.
More importantly I would ask why you are executing a sql command that
can take 5 days to run? There must be a better way to do what you want.

gm
archana wrote:
Hi all,

I am executing one stored procedure in windows service.

I set sqlcommad's CommandTimeout to 432000 which means 5 days timeout.

Still after 11th hour i am getting timeout. I am not getting if i set
timeout as 5 days why i am getting timeout before that.

Please shed some light on it.

Thanks in advance.


Jun 2 '06 #2
Hi,

thanks for your reply.

Actually my sp is long running which may take a day or 2 days.

And I read somewhere that try to prevent setting timeout to 0 means
infinite.

so i set timeout to 5 days.

But i am still facing the problem.

thanks.

gmiley wrote:
Have you set your servers remote query timeout option?

sp_configure 'remote query timeout', 0
-- This sets it to infinite, otherwise replace the 0 with N,
-- where N = number of seconds to wait.
More importantly I would ask why you are executing a sql command that
can take 5 days to run? There must be a better way to do what you want.

gm
archana wrote:
Hi all,

I am executing one stored procedure in windows service.

I set sqlcommad's CommandTimeout to 432000 which means 5 days timeout.

Still after 11th hour i am getting timeout. I am not getting if i set
timeout as 5 days why i am getting timeout before that.

Please shed some light on it.

Thanks in advance.


Jun 2 '06 #3
Is the timeout specified in seconds or milliseconds or something else.
I suggest you to check the documentation. I am not sure if that is the
problem.

archana wrote:
Hi,

thanks for your reply.

Actually my sp is long running which may take a day or 2 days.

And I read somewhere that try to prevent setting timeout to 0 means
infinite.

so i set timeout to 5 days.

But i am still facing the problem.

thanks.

gmiley wrote:
Have you set your servers remote query timeout option?

sp_configure 'remote query timeout', 0
-- This sets it to infinite, otherwise replace the 0 with N,
-- where N = number of seconds to wait.
More importantly I would ask why you are executing a sql command that
can take 5 days to run? There must be a better way to do what you want.

gm
archana wrote:
Hi all,

I am executing one stored procedure in windows service.

I set sqlcommad's CommandTimeout to 432000 which means 5 days timeout.

Still after 11th hour i am getting timeout. I am not getting if i set
timeout as 5 days why i am getting timeout before that.

Please shed some light on it.

Thanks in advance.


Jun 2 '06 #4
Sounds interesting, you are sure you stored procedure run completed without
runing it using windows service? What's that stored procedure doing by the
way?

chanmm

"archana" <tr**************@yahoo.com> wrote in message
news:11**********************@h76g2000cwa.googlegr oups.com...
Hi all,

I am executing one stored procedure in windows service.

I set sqlcommad's CommandTimeout to 432000 which means 5 days timeout.

Still after 11th hour i am getting timeout. I am not getting if i set
timeout as 5 days why i am getting timeout before that.

Please shed some light on it.

Thanks in advance.

Jun 2 '06 #5
I just personally have never seen any reason for anything in SQL to run
for that long. I would suggest evaluating and rewriting that stored
procedure. Either just rewrite it to streamline it, or break it into
several segments. If it is a lot of repeating processing, I would
suggest recreating it to process 1 record at a time, and have a simple
application that gathers the data to be processed then executes that
stored procedure or statement on each of the records.

gm
archana wrote:
Hi,

thanks for your reply.

Actually my sp is long running which may take a day or 2 days.

And I read somewhere that try to prevent setting timeout to 0 means
infinite.

so i set timeout to 5 days.

But i am still facing the problem.

thanks.

gmiley wrote:
Have you set your servers remote query timeout option?

sp_configure 'remote query timeout', 0
-- This sets it to infinite, otherwise replace the 0 with N,
-- where N = number of seconds to wait.
More importantly I would ask why you are executing a sql command that
can take 5 days to run? There must be a better way to do what you want.

gm
archana wrote:
Hi all,

I am executing one stored procedure in windows service.

I set sqlcommad's CommandTimeout to 432000 which means 5 days timeout.

Still after 11th hour i am getting timeout. I am not getting if i set
timeout as 5 days why i am getting timeout before that.

Please shed some light on it.

Thanks in advance.


Jun 2 '06 #6
Hi chanmm,

thanks for you reply.

If i run through query analyser, it is working properly. Even through
windows services also sometimes it is working properly. and sometimes
it is failing. I am not getting why this is happening i have specified
timeout as 432000 which is equal to 5 days.

If you can shed some light on it then it will be really helpful for me.

thanks.

chanmm wrote:
Sounds interesting, you are sure you stored procedure run completed without
runing it using windows service? What's that stored procedure doing by the
way?

chanmm

"archana" <tr**************@yahoo.com> wrote in message
news:11**********************@h76g2000cwa.googlegr oups.com...
Hi all,

I am executing one stored procedure in windows service.

I set sqlcommad's CommandTimeout to 432000 which means 5 days timeout.

Still after 11th hour i am getting timeout. I am not getting if i set
timeout as 5 days why i am getting timeout before that.

Please shed some light on it.

Thanks in advance.


Jun 6 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Craig Storey | last post by:
I have a form where users logged in using sessions can edit articles in a WYSIWYG editor. Some of them take their time and don't like to save their work very often and occassionally the sessions...
11
by: Frank Rizzo | last post by:
Hello, My c# based windows service takes a while to dispose. I have to release bunch of resources all over the place and unfortunately it can take 20-40 seconds before I can cleanly exit. ...
17
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be...
7
by: Mike | last post by:
I am having problems with my sessions timing out on a windows 2003 server. I have set the timeout in the web.config as well as in the application properties. It works fine on a windows 2000...
3
by: Mike | last post by:
Timeout Calling Web Service I am calling a .NET 1.1 web service from an aspx page. The web service can take several minutes to complete its tasks before returning a message to the aspx page. ...
1
by: Arthur Dent | last post by:
Hello all, I am having a significant problem with the security in my app. I am experiencing a problem, where the session apparently times out, and all my session data is reset just as if a new...
10
by: Atul Shukla | last post by:
Hi, How can I avoid application timeout? Generally a web application time out is 20 minutes, however, we can define this timeout in web.config to any number of minutes. After giving 500 minutes of...
3
by: jbhabion | last post by:
Hello, I am developping some webpages where our PDA-user can access some company information. Our webserver has asp.net 1.1 installed. Users can login and access the information, after a...
7
by: anithaapr05 | last post by:
Hi, I am creating a session when user successfully login to the site and user gets a form to input some data into database. Assume that user entered data into some fileds and let the browser...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.