In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to set timeout with ajax". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to set timeout with ajax".
This operation will take more than 5 minutes to complete, engineering environment apache2+tomcat6.0.
An online search found several places where timeouts can be set:
1.ajax syntax to set units of milliseconds, for example:
$.ajax ({url: XXX, timeout: 600000, type: 'POST', data: {}, error: function () {show_fail_meg ("failed to start system!") ;})
2.tomcat configure server.xml unit millisecond
Connector port= "8080" protocol= "HTTP/1.1" connectionTimeout= "20000" redirectPort= "8443" URIEncoding= "UTF-8" / >
3.apache configuration file httpd.conf (in second)
# # Timeout: The number of seconds before receives and sends time out. # Timeout 60
After modifying the above, it was found that it still did not take effect, and finally located in the mod_jk module.
Mod_jk, referred to as JK, is a pluggable module of the Apache server, which is used to provide Apache or IIS servers with the ability to process JSP/Servlet.
In other words, the settings of JK may override the settings of apache2 and tomcat as well as ajax.
The configuration file / etc/httpd/conf/workers.properties for JK is as follows:
Worker.master.socket_timeout=300
Sure enough, I saw that this number is exactly 5 minutes, which is consistent with the abnormal phenomenon. It is normal to restart after changing the size.
Thank you for reading, the above is the content of "how to use ajax to set timeout". After the study of this article, I believe you have a deeper understanding of how to use ajax to set timeout, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.