简体   繁体   English

浏览器/ jQuery代理错误

[英]Browser/jQuery Proxy Error

We have a web app that has a built-in search feature that our users can perform complex searches. 我们有一个具有内置搜索功能的Web应用程序,我们的用户可以执行复杂的搜索。 Here's our software stack: 这是我们的软件堆栈:

  • Server-side is Spring MVC using Struts/JSPs for view 服务器端是使用Struts / JSP进行查看的Spring MVC
  • Client-side JS library is pure jQuery and jqGrid for tables 客户端JS库是用于表的纯jQuery和jqGrid
  • Web app is packaged as a WAR and deployed to a Tomcat 6.0.35 container Web应用程序打包为WAR,并部署到Tomcat 6.0.35容器中
  • Apache 2.2.22 Web Server is a reverse proxy and serves our JS (I know this is not really necessary but this is how the project was handed to us, not our design!) Apache 2.2.22 Web服务器是一个反向代理,并为我们的JS提供服务(我知道这不是必须的,但这是项目交给我们的方式,而不是我们的设计!)
  • Backend is built & maintained by another team, but uses SOLR and Oracle for the text search feature described above 后端是由另一个团队构建和维护的,但是使用SOLR和Oracle来实现上述文本搜索功能

When users perform "broad" queries (queries that aren't targeted well and require SOLR to really chug) after about 30 seconds they get an error message on the screen that simply reads " Proxy Error ". 当用户在大约30秒后执行“广泛”查询(针对性不强的查询,需要SOLR真正进行查询)时,他们会在屏幕上收到一条错误消息,该错误消息仅显示为“ Proxy Error ”。 That error message is displayed in lieu of the normal jqGrid table that displays the search results. 将显示该错误消息,而不是显示搜索结果的普通jqGrid表。

I have done a full text search of every file in our project and cannot find this phrase, nor " Proxy ", nor " proxy ". 我已经对项目中的每个文件进行了全文搜索,找不到该短语,也找不到“ Proxy ”或“ proxy ”。

90% of the time these mysterious and elusive "Proxy Error"s are happening in IE8 and IE9, although occasionally they have been spotted in FireFox. 尽管在Firefox 8中偶尔发现了这些神秘而难以捉摸的“代理错误”,但90%的情况是在IE8和IE9中发生的。

Since that string (or anything similar to it) is not found in our codebase, it has to be coming from one of these 3rd party dependencies, and just getting sent back to the user in the form of search results. 由于在我们的代码库中找不到该字符串(或类似的字符串),因此它必须来自这些第三方依赖项之一,并且只是以搜索结果的形式发送回用户。

Has anybody ever seen any of these technologies behave like this before? 以前有没有人见过这些技术中的任何一种? Could this be something the browsers are injecting into the DOM somehow? 这可能是浏览器以某种方式注入DOM的东西吗? I'm stupified here and running out of time. 我在这里吓呆了,没时间了。

The 50x's are absolutely coming from Apache. 50倍绝对来自Apache。 Check httpd.conf - you probably have timeouts defined like Timeout=blah . 检查httpd.conf您可能已经定义了超时,如Timeout=blah If this property is defined, then when Apache forwards requests on to Tomcat, if Tomcat takes long than blah to respond Apache fails fast, and returns a 50x to the client, injecting "Proxy Error" into the response body. 如果此属性定义,那么当阿帕奇将请求转发到Tomcat的,如果Tomcat需要很长的比blah回应阿帕奇失败快,并返回50倍到客户端,注入“代理错误”在响应主体。

Simply remove this timeout setting, which causes modern versions of Apache to wait indefinitely. 只需删除此超时设置,这将导致现代版本的Apache无限期等待。 At least that way you won't get Proxy Errors, although there's no guarantee Tomcat will returns anything to Apache. 至少以这种方式,您不会收到“代理错误”,尽管不能保证Tomcat会将任何内容返回给Apache。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM