c# - Connection Timeout but Job still running -
i have iis website going internal job processing. job take 10 mins. when user click button start job, after minute whole page whipe white , showing "connection timeout". job related calling 3rd pty apis, still going underground.
when job still running, user cannot log website. after job finished, user can use website again.
is there secret here?
you have several things in play here.
- time web browser wait response
- time webserver process request
- time sql command execute before client times out.
- time sql server run command before terminates command.
typically webbrowser 1 minute or 2 (not sure of exact numbers) see: connection timeout in ie see: in firefox should able check about:config
for webserver , asp.net see httpruntimesection.executiontimeout property
command timeout see sqlcommand.commandtimeout default 30 seconds.
that being said... because client stops waiting doesn't force sql server stop running command. calling close on connection should stop running command on server, may need wait rollback changes may have made.
i suspect not using sql server agent jobs if disconnecting connection not stop job.
if client not waiting send output send output client...
like
response.write("<!-- progress ... -->"); response.flush();
you have flush doesn't buffer response on server side
Comments
Post a Comment