Search code examples
grailsgrails-2.2

does the controller action stop immediately when page timeout occurs?


I have a controller action that does heavy computation and takes 10 minutes or more to complete.

def timeConsumingOperation(){


}

when i request the url /application/timeConsumingOperation after sometime of waiting the browser shows timeout or service unavailable.

My question is does this timeout also stop the backend method from running or even though the connection to the server is detached, the method will run till completion in the backend? Thanks for the answer!


Solution

  • If this timeout is enforced solely by your browser, the operation will continue, but may fail. In particular, the response output stream will be closed and any attempts to write to it will throw exceptions.