镀铬XmlHtt prequest悬挂 [英] Chrome XmlHttpRequest Hanging

查看:193
本文介绍了镀铬XmlHtt prequest悬挂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我做一个XmlHtt prequest(通过jQuery的$。阿贾克斯)到一个特定的网址,我的Chrome浏览器一直挂着,每次用状态的待处理的要求。

When I make a XmlHttpRequest (via jQuery's $.ajax) to a particular URL, my Chrome consistently hangs every time with a status on the request of 'Pending'.

在该浏览器必须即关闭。强行从任务管理器,它表现出混乱的一般症状,如饼干和脚本选项卡为空时,他们完全正常的寻找数据前夕。

After that Chrome must be closed ie. forcibly from Task Manager, and it exhibits general signs of mayhem such as the Cookies and Scripts tabs being empty when they were full of normal looking data immediately prior.

这是奇怪,因为(一)我的同事,运行一个看似相同的一切,有没有这样的问题; (二)我一直在使用Chrome浏览器运行此code(我们公司的JavaScript应用程序)了好几个月,这只是开始发生没有明显的原因。

This is odd because (a) my coworkers, running a seemingly identical everything, have no such problems; (b) I have been using Chrome to run this code (our company's JavaScript app) for many months and this just started happening for no apparent reason.

我检查了Apache日志,他们似乎正常,完成处理请求,而Chrome不会看到的答复,显然。

I checked out the Apache logs, they appear to be processing the request normally and to completion, but Chrome never sees the reply, apparently.

一对夫妇的其他澄清:失败之前,相同的浏览器和Apache返回JS和图像文件通常情况下,例如一卡车,事情似乎要被罚款的权利,直到他们没有。该请求不是特别大的复杂以任何明显的方式(几百进出字节)或。

A couple of other clarifications: prior to the failure, the same Chrome and Apache return a truckload of JS and image files normally, eg., things seem to be fine right up until they aren't. The request is not particularly large (a few hundred bytes in and out) or complex in any obvious way.

如果任何人都可以给我去哪里找一些提示,我会很感激!

If anybody can give me some hints of where to look, I'd be grateful!

推荐答案

我遇到稍有不同的症状类似的行为。我的Ajax请求做工精细,每秒请求多达6个请求,然后他们都开始失败的(相同的URL的工作,同样的有效载荷等时),但在我的情况下,他们甚至不打服务器,只是停留在之前 在督察。

I'm experiencing similar behavior with slightly different symptoms. My ajax requests work fine, every second request up to 6 requests, then they all start failing (same url as when working, same payload, etc), but in my case they're not even hitting the server, just stuck in "Pending" in Inspector.

我没有给你一个答案,而是帮助调试,你有没有尝试过铬合金网内部?

I dont have an answer for you, but to help debug, have you tried chromes net-internals?

浏览器指向:

chrome://net-internals/#sockets

和/或

chrome://net-internals/#events

我看到我的#sockets请求进入活跃,但从来没有回来,并在#events我可以看到,经过该请求摊位HOST_RESOLVER_IMPL_REQUEST阶段。

I see my requests in #sockets go into "active", but never come back, and in #events I can see that the request stalls after the HOST_RESOLVER_IMPL_REQUEST stage.

我想这可能是造成无法正常结束请求的资源问题,但那只是纯粹的炒作。

I'm thinking it could be a resource issue caused by not properly ending the request, but thats just pure speculation.

这篇关于镀铬XmlHtt prequest悬挂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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