URL gets POSTed again

I have a nodejs application where on certain POST request I execute some python scripts read the output and render the page. This works fine if the time taken in executing python script is small enough. But when execution time for python script exceeds certain limit the request gets posted again.

(t) URL betamon_deploy_a 
(E) LOCALE locale 

POST /betamon/deploy_a - - ms - -
(t) URL betamon_deploy_a 
(E) LOCALE locale

I am new to nodejs, so I am not sure why its happening. Below are my code deatils:

  • On click of a button jquery POST is called $.post("deploy_a", {...}); and waits for response function(response) {},"json") and shows success or error message
  • Above POST request calls a nodejs controller which executes the python script, reads the output and writes the response res.write(JSON.stringify(model)); res.end();. Controller also stores the output in Db

Please let me know if any thing wrong with this approach.