且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法加载资源:net :: ERR_EMPTY_RESPONSE http://test.com

更新时间:2022-10-19 19:18:06

我遇到同样的问题。我开发了一个非常强大的AJAX应用程序,该应用程序在本地主机上运行良好。间歇性地接受使用相同的机器测试现场(由GoDaddy托管)按下按钮以激活AJAX功能。



如果我反复按下按钮,然后观看在开发人员工具中发生了什么,我看到 Error 324(net :: ERR_EMPTY_RESPONSE):服务器关闭连接而不发送任何数据。
表示(失败):



开上图中的第八次尝试,你可以看到它终于奏效。 验证这是否是发生在您身上的***方法是等待1分钟,然后重复该操作。似乎连接的速度是导致此问题的原因,但速度最后的错误比第一次成功要快得多。当我检查其他网站以确认互联网仍然处于开启状态时,这可能会对网络浏览器或主机中的设置产生更多影响。根据此答案,您可以看到这似乎是问题的解决方案。但是,再次,此答案指出重置网络设置和重新启动计算机。其他解决方案指向清除浏览器缓存或禁用加载项,但作为非技术用户解决方案的重新加载或刷新非常困难和不可靠。

最后,这可能与托管服务器设置有关。

我怀疑它可能与服务器感应到DDOS攻击(大量的小AJAX请求)有关,因此它暂时阻止/忽略请求。更改主机(或自托管)可能是***解决方案。


Im working on a chrome extension which sends XMLHttpRequest to a URL, gets response in JSON format, parse the response and shows list of records. Its working fine. The problem is when user performs any action and go back to listing section, system follows the same process sends the XMLHttpRequest request but everytime i get this response:

Failed to load resource: net::ERR_EMPTY_RESPONSE http://test.com

First time when i load the extension everything works fine, after that it always show the above mentioned error.

Its a two HTML pages extension. One for signin and other for listing. Im using ajax to toggle divs based on results.

Now the Weird part. Only 3 of my users have this problem so far. Two of them have mac and one windows 8.1. For all other users it works perfectly fine.

I have run across the same problem. I developed a very AJAX intensive application, which works perfectly on the localhost. Using the identical machine to test the live site (hosted by GoDaddy) pressing a button to activate an AJAX function is intermittently accepted.

If I repeatedly press the button, and watch what is going on in the developer tools, I see the Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data. indicated by the "(failed)":

On the eighth attempt in the above picture, you can see it finally worked. The best way to verify if this is what is happening to you is to wait 1 minute, and repeat the action. It seems that the speed of the connection is what is causing this problem, although the speed of the last error is much faster than the first success. And while I am checking other websites to verify that the internet is still "ON", this might do more with the settings in the web-browser, or the host computer. You can see that this seems to be the solution to the problem, according to this answer. But then again, this answer states to reset the network settings and restart the machine.

Other solutions point to clearing the browser's cache or disabling add-ons, but reloading or refreshing is difficult and unreliable as a solution for non-tech users. Finally, it might have something to do with the hosting server settings.

I suspect it may have something to do with the Server sensing a DDOS attack (a large number of small AJAX requests), so it temporarily blocks/ignores the request. Changing hosts (or self hosting) may be the best solution.