前些时间,我们的的一个管理系统出现了点问题,原本运行的好好的功能,业务方突然讲不行了,那个应用已经运行了好多年了,并且对应的代码最近谁也没改动过,好奇怪的问题,为了解决此问题,我们查看了日志,发现请求的参数压根没有传到后台控制器之中,奇怪了!明明前端传递了好多参数过来了呀!线上系统比较重要,又需要马上使用必须赶紧解决呀!

提交请求时的页面反应,如下所示:

于是我们想在本地模拟同样的操作,可气的是本地压根没任何问题,好头疼,对于这样的问题确实是最令人头疼的,同样的代码一边运行不了,一边屁事没有,后来又重新的询问用户是怎么操作的,我们载严格的操作一遍,可是在本地还是没有任何问题,后来想到,我们的操作行为是一样的,但是数据却是不一样的,同时我们也注意到,同样的功能,除了某些数据,其他的数据也能能够操作成功,好吧!估计和数据量有关系!于是就在本地大量的造数据再次的模仿,后来造了近万条的数据在本地终于也能出现一样的问题了,确实和提交的数据量有关系,且首次调用的时候会出现如下的错误提示信息:

六月 02, 2017 2:59:08 下午 org.apache.tomcat.util.http.Parameters processParameters
信息: More than the maximum number of request parameters (GET plus POST) for a single request ([10,000]) were detected. Any parameters beyond this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.
Note: further occurrences of this error will be logged at DEBUG level.

这个提示信息还算老实,比较明显就能暴露出对应的问题了——当请求的参数过多的时候,会忽落多余的参数,修正的方法也给出的了对应的提示,扩大对应的参数配置就行了!

从网上也找到了类似的问题解决方案,如下所示:

http://www.tuicool.com/articles/zqQzEnJ

http://blog.sina.com.cn/s/blog_69398ed90101gfly.html

我也在本地试验了一下,(我本地使用的tomcat版本是 7.0.61)

修改server.xml文件的相关配置

修改的主要内容如下所示:

每个参数对应的具体含义,请参看如下的文档:

https://tomcat.apache.org/tomcat-7.0-doc/config/http.html

当然,后来这个修改方案,并没有被采用,因为我们的架构师不建议改动tomcat的默认配置,以防止以后升级或者随着数据量的增加再次的出现类似的问题。

问题的解决往往不难,关键是发现问题的所在比较费劲,就好像以前听过的一个给机器划线的工程师的故事一样,精准定位的问题的价值占到解决问题总价值的99%。

这个问题的关键是请求参数过多,那么思路至少有两个:

1:修改配置,就是让过多的请求参数顺利到达后端

2:从前端减少请求的参数,这个需要分析,最终我们也是采用了这个方案

以后可能还会遇到类似的问题,因为有些应用如果设计的不好玩的话,随着时间的推移,可能也存在请求的参数不断增长且往后端传递的情况,程序没变,运行环境看似也没有遍,但是数据量变了,这是一个潜在的问题导火索!

More than the maximum number of request parameters的更多相关文章

  1. Failed to connect to database. Maximum number of conections to instance exceeded

    我们大体都知道ArcSDE的连接数有 48 的限制,很多人也知道这个参数可以修改,并且每种操作系统能支持的最大连接数是不同的. 如果应用报错:超出系统最大连接数 该如何处理? 两种解决办法: 第一,首 ...

  2. Maximum number of WAL files in the pg_xlog directory (1)

      Guillaume Lelarge: Hi, As part of our monitoring work for our customers, we stumbled upon an issue ...

  3. iOS---The maximum number of apps for free development profiles has been reached.

    真机调试免费App ID出现的问题The maximum number of apps for free development profiles has been reached.免费应用程序调试最 ...

  4. [LeetCode] Third Maximum Number 第三大的数

    Given a non-empty array of integers, return the third maximum number in this array. If it does not e ...

  5. [LeetCode] Create Maximum Number 创建最大数

    Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum numb ...

  6. LeetCode 414 Third Maximum Number

    Problem: Given a non-empty array of integers, return the third maximum number in this array. If it d ...

  7. Parameter Passing / Request Parameters in JSF 2.0 (转)

    This Blog is a compilation of various methods of passing Request Parameters in JSF (2.0 +) (1)  f:vi ...

  8. POJ2699 The Maximum Number of Strong Kings

    Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2102   Accepted: 975 Description A tour ...

  9. [LintCode] Create Maximum Number 创建最大数

    Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum numb ...

随机推荐

  1. HDU3306 Another kind of Fibonacci 矩阵

    欢迎访问~原文出处——博客园-zhouzhendong 去博客园看该题解 题目传送门 - HDU3306 题意概括 A0=1,A1=1,AN=X*AN-1+Y*AN-2(N>=2).求SN,SN ...

  2. 057 Hive项目案例过程

    1.说明 这里只粘贴一张,图,主要针对的hive的项目的实践过程. 2.图 3.需求 统计PV 统计注册人数 => 这个是一个公司会关注的,每天的注册率. 统计ip 统计跳出率 => ip ...

  3. 047 大数据下的java client连接JDBC

    1.前提 启动hiveserver2服务 url,username,password. 2.官网 3.程序 4.结果 emp的第一列与第二列 5.源程序 package com.cj.it.hiveU ...

  4. Python 豆瓣源

    国内的pythoner强烈建议使用豆瓣的pypi源 https://pypi.douban.com/simple/ sudo pip install -i https://pypi.douban.co ...

  5. java 如何用pattern 和 Matcher 来使用正则表达式

    java的regex库 java里预留了一个regex库,方便于我们在java里操作正则表达式,或者用它来匹配字符串. 其中比较常用的就是 Pattern 和 Matcher ,pattern是一个编 ...

  6. PopupWindow下拉列表

    效果图 步骤: 1.画出编辑框的布局.popupWindow的布局.popupWindow中listview每行的布局 2.new一个PopupWindow对象,设置其属性 3.定义一个BaseAda ...

  7. RabbitMQ消息可靠性分析和应用

    RabbitMQ流程简介(带Exchange) RabbitMQ使用一些机制来保证可靠性,如持久化.消费确认及发布确认等. 先看以下这个图: P为生产者,X为中转站(Exchange),红色部分为消息 ...

  8. Spring框架学习07——基于传统代理类的AOP实现

    在Spring中默认使用JDK动态代理实现AOP编程,使用org.springframework.aop.framework.ProxyFactoryBean创建代理是Spring AOP 实现的最基 ...

  9. spark加载模型与gRPC与JSF与JDQ冲突

    spark与JSF冲突解决方式 <dependency> <groupId>org.apache.spark</groupId> <artifactId> ...

  10. Java并发程序设计(十)设计模式与并发之Future模式

    设计模式与并发之Future模式 核心思想:异步调用. /** * @author: Tang Jiujia * @version: 2017/9/18 0018 15:22 */ public in ...