Friday, March 30, 2012

long running runnable processess

Some times on over prod. server i found some porcesses running for more than
2-3 hors, they r not in sleeping mode but runnable.
How it cab happen as our frontend uses commandtimout= 3 minutes.
ThanksThe timeout will just tell the client to give up after 3 minutes and
stop waiting for a response from the server. It doesn't tell the server
to abort the statement. The only way to get the server to give up in
the middle of a statement, assuming the server doesn't encounter an
exception (ie. throw an error) during processing of that statement, is
to use the KILL statement to terminate the SPID (process), which will
also disconnect the client application using that connection.
However, if a process has been running for a couple hours and you kill
it, then presumedly it has been doing a fair bit of work and the server
will need to roll that work back. So killing a process often, but not
always, takes as long as the current statement has been running for
anyway, and you never know if the statement is just seconds away from
finishing; that's the risk you take.
*mike hodgson*
http://sqlnerd.blogspot.com
vicky wrote:

>Some times on over prod. server i found some porcesses running for more tha
n
>2-3 hors, they r not in sleeping mode but runnable.
>How it cab happen as our frontend uses commandtimout= 3 minutes.
>Thanks
>
>|||Is this user process or some scheduled/system task. Please take a look at
one of Erland's script which should help narrow things down.
http://www.sommarskog.se/sqlutil/aba_lockinfo.html
-oj
"vicky" <v@.v.com> wrote in message
news:%237T88MhmGHA.3600@.TK2MSFTNGP02.phx.gbl...
> Some times on over prod. server i found some porcesses running for more
> than 2-3 hors, they r not in sleeping mode but runnable.
> How it cab happen as our frontend uses commandtimout= 3 minutes.
> Thanks
>|||Is this user process or some scheduled/system task. Please take a look at
one of Erland's script which should help narrow things down.
http://www.sommarskog.se/sqlutil/aba_lockinfo.html
-oj
"vicky" <v@.v.com> wrote in message
news:%237T88MhmGHA.3600@.TK2MSFTNGP02.phx.gbl...
> Some times on over prod. server i found some porcesses running for more
> than 2-3 hors, they r not in sleeping mode but runnable.
> How it cab happen as our frontend uses commandtimout= 3 minutes.
> Thanks
>|||The timeout will just tell the client to give up after 3 minutes and
stop waiting for a response from the server. It doesn't tell the server
to abort the statement. The only way to get the server to give up in
the middle of a statement, assuming the server doesn't encounter an
exception (ie. throw an error) during processing of that statement, is
to use the KILL statement to terminate the SPID (process), which will
also disconnect the client application using that connection.
However, if a process has been running for a couple hours and you kill
it, then presumedly it has been doing a fair bit of work and the server
will need to roll that work back. So killing a process often, but not
always, takes as long as the current statement has been running for
anyway, and you never know if the statement is just seconds away from
finishing; that's the risk you take.
*mike hodgson*
http://sqlnerd.blogspot.com
vicky wrote:

>Some times on over prod. server i found some porcesses running for more tha
n
>2-3 hors, they r not in sleeping mode but runnable.
>How it cab happen as our frontend uses commandtimout= 3 minutes.
>Thanks
>
>sql

No comments:

Post a Comment