When the deployment scripts runs, it blocks the response to the browser. The pushing and deploying of the provisioning script should be done with some sort of queue system from a console command. The web server times out waiting for a response otherwise.