Today in the test project found that an action performed 2 times, this operation takes approximately 5 minutes to complete, engineering environment apache2+tomcat6.0.
The online search found several places to set timeouts:
1.ajax syntax to set the unit millisecond, for example:
$.ajax ({
url:xxx,
timeout:600000,
type: ' POST ',
data: {
},
error:function () {
Show_ Fail_meg ("Boot system failed!) ");
}
});
2.tomcat Configuration server.xml Unit milliseconds
Connector port= "8080" protocol= "http/1.1" connectiontimeout= "20000" redirectport= "8443"
UTF-8 "/>
3.apache configuration file httpd.conf, unit seconds
#
# timeout:the number of seconds before receives and sends time out.
#
Timeout 60
Modify the above several places, found still not effective, and finally positioned in the MOD_JK module,
MOD_JK abbreviation JK is an pluggable module of the Apache server that provides the ability to handle jsp/servlet for Apache or IIS servers.
That is, JK settings may overwrite the settings of Apache2 and Tomcat as well as Ajax.
The contents of JK's configuration file/etc/httpd/conf/workers.properties are as follows:
worker.master.socket_timeout=300
Sure enough to see this number is exactly 5 minutes, with the exception of the same phenomenon, after the reboot, normal!