Glassfish 3.1.1 increase asadmin deployment timeout
Recently I was wondering why the deployment of a EAR-File on Glassfish 3.1.1 over the Web-Administration-Console or with asadmin took very very long in compare to local deployment with eclipse. The EAR-File is about 50 MB of size and contains a complex web-application. With eclipse deployment takes about 20 seconds. With administration-console or with asadmin the deployment takes more than 10 minutes. As the default deployment timeout value of asadmin is 600 seconds i even wasn’t able to deploy it at all.
This was the error message:
No response from Domain Admin Server after 600 seconds. The command is either taking too long to complete or the server has failed. Please see the server log files for command status. Command deploy failed.
I was searching the web and found the source of the problem:
As I only needed to deploy one time I thought I would go with remote-deployment, and just wait. But how to increase the deployment timeout, after searching quite some time on the web, I found the solution. Just set the environment variable AS_ADMIN_READTIMEOUT to increase the asadmin deployment timeout from 600 seconds to 3600 seconds.
export AS_ADMIN_READTIMEOUT="3600000" ./asadmin deploy yourPackage.ear