无法加载资源:net :: ERR_EMPTY_RESPONSE http://test.com [英] Failed to load resource: net::ERR_EMPTY_RESPONSE http://test.com

查看:453
本文介绍了无法加载资源:net :: ERR_EMPTY_RESPONSE http://test.com的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个将XMLHttpRequest发送到URL的chrome扩展,获取JSON格式的响应,解析响应并显示记录列表。它的工作正常。问题是,当用户执行任何操作并返回到列表部分时,系统遵循相同的过程发送XMLHttpRequest请求,但每次我收到响应时:

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

第一次当我加载扩展一切工作正常,之后,它总是显示上述错误。

它是两个HTML页面扩展。一个用于登录和其他列表。 Im使用ajax根据结果切换div。



现在是Weird部分。到目前为止,我的用户中只有3个有这个问题。其中两个有mac和一个windows 8.1。对于所有其他用户,它的工作原理完全正常。

解决方案

我遇到同样的问题。我开发了一个非常强大的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.

这篇关于无法加载资源:net :: ERR_EMPTY_RESPONSE http://test.com的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆