在Controller里回放,总会有一两个用户报500错误
界面操作是:店铺登陆系统后,点击树形菜单中的复消浏览,界面上列出在该店报单记录。设置20个用户同时查看,基本上每次都会有一两个用户报500错误。用报错的那些店铺编号人工进入查询不会错。把错误信息给开发了,也找不出原因,所以在此请教应该怎么办。
下面是日志信息:
Action.c(14): : Input string was not in a correct format.\r\n
Action.c(14): at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number,
Action.c(14): NumberFormatInfo info, Boolean parseDecimal)\r\n
Action.c(14): at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)\r\n
Action.c(14): at System.Convert.ToInt32(String value)\r\n
Action.c(14): at Store_DeclarationsBrowse_RepeatBrowsing.GetBindGridViewData(Boolean isSearchBtn)\r\n
Action.c(14): at Store_DeclarationsBrowse_RepeatBrowsing.Page_Load(Object sender, EventArgs e)\r\n
Action.c(14): at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, Ev
Action.c(14): entArgs e)\r\n
Action.c(14): at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)\r
Action.c(14): \n
Action.c(14): at System.Web.UI.Control.OnLoad(EventArgs e)\r\n
Action.c(14): at System.Web.UI.Control.LoadRecursive()\r\n
Action.c(14): at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean
Action.c(14): includeStagesAfterAsyncPoint)\r\n
Action.c(14): : Exception of type 'System.Web.HttpUnhandledException' wa
Action.c(14): s thrown.\r\n
Action.c(14): at System.Web.UI.Page.HandleError(Exception e)\r\n
Action.c(14): at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean
Action.c(14): includeStagesAfterAsyncPoint)\r\n
Action.c(14): at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean inc
Action.c(14): ludeStagesAfterAsyncPoint)\r\n
Action.c(14): at System.Web.UI.Page.ProcessRequest()\r\n
Action.c(14): at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)\r\n
Action.c(14): at System.Web.UI.Page.ProcessRequest(HttpContext context)\r\n
Action.c(14): at ASP.store_declarationsbrowse_repeatbrowsing_aspx.ProcessRequest(HttpContext context)
Action.c(14): \r\n
Action.c(14): at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExec
Action.c(14): utionStep.Execute()\r\n
Action.c(14): at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchr
Action.c(14): onously)\r\n 这是出错的步骤:
web_url("RepeatBrowsing.aspx",
"URL=http://172.16.10.251/yofoto/Store/DeclarationsBrowse/RepeatBrowsing.aspx",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://172.16.10.251/yofoto/Store/DeclarationsCenter/Register.aspx",
"Snapshot=t6.inf",
"Mode=HTML",
EXTRARES,
"Url=/yofoto/ico/page_arrow3.gif", ENDITEM,
"Url=/yofoto/ico/page_arrow1.gif", ENDITEM,
"Url=/yofoto/ico/page_arrow4.gif", ENDITEM,
"Url=/yofoto/ico/page_arrow2.gif", ENDITEM,
LAST); 把第一行错误的日志打全看看吧,看到底接收的参数是什么
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number,
Action.c(14): NumberFormatInfo info, Boolean parseDecimal)\r\n 日志里没有参数了呀,是这后面的数字吗
\r\n
Action.c(14): System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number
Action.c(14): , NumberFormatInfo info, Boolean parseDecimal) +9594411\r\n
Action.c(14): System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119\r\n
Action.c(14): System.Convert.ToInt32(String value) +48\r\n
Action.c(14): Store_DeclarationsBrowse_RepeatBrowsing.GetBindGridViewData(Boolean isSearchBtn) +626\r
Action.c(14): \n
Action.c(14): Store_DeclarationsBrowse_RepeatBrowsing.Page_Load(Object sender, EventArgs e) +210\r\n
Action.c(14): System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, Event
Action.c(14): Args e) +14\r\n
Action.c(14): System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
Action.c(14): \r\n
Action.c(14): System.Web.UI.Control.OnLoad(EventArgs e) +91\r\n
Action.c(14): System.Web.UI.Control.LoadRecursive() +74\r\n
Action.c(14): System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean in
Action.c(14): cludeStagesAfterAsyncPoint) +2207\r\n 10个用户执行出错? 10个用户执行了几次都没出错 看上去像是应用程序的性能问题 应该从哪里找问题呢 本来怀疑变量造型出错,但你有说明10用户没错。
用18个试试,可以先看资源消耗情况,DB有无锁等待与死锁等,看看响应时间,然后有无超时设定,信息太少,没法给出更好的建议,只能建议一个一个排查。 我添加的是以下几个计数器,不知道是不是这几个 另外还添加有DB的闩锁,死锁等待时间都为0, :'( 我看什么都是正常的 20个用户并发会出错,而10个用户并发OK,很明显示应该是该模块承受不了这么大的压力(如因超时)而产生的错误. 你的压力并不大呀,八成用了集合点吧,可以尝试调整WEB服务器的配置,连接数、缓存之类,但建议换种方式测试,这样只是一个瞬时压力而已。 你的压力并不大呀,八成用了集合点吧,可以尝试调整WEB服务器的配置,连接数、缓存之类,但建议换种方式测试,这样只是一个瞬时压力而已。
页:
[1]