zipkin检测到接口请求时间异常

Blade 未结 1 43
wangjie
wangjie 剑圣 2022-05-12 13:35

一、该问题的重现步骤是什么?

nohup java -Xms4096m -Xmx4096m -XX:PermSize=512m -XX:MaxPermSize=1024m -XX:MaxNewSize=1024m -jar -Dspring.profiles.active=prod  blade-iot.jar  > /dev/null 2>&1 &   是不是设置的有问题?内存溢出


二、你期待的结果是什么?实际看到的又是什么?

zipkin spans是4的时候就内存溢出了

image.png


三、你正在使用的是什么产品,什么版本?在什么操作系统上?


四、请提供详细的错误堆栈信息,这很重要。

1524574521028263937 000000 blade-iot Holyview 172.19.0.1:8113 prod POST /factorySecondtestData/save okhttp/3.14.9 org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.OutOfMemoryError: Java heap space

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1055)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)

at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:517)

at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:584)

at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)

at brave.servlet.TracingFilter.doFilter(TracingFilter.java:68)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:45)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at org.springblade.core.log.filter.LogTraceFilter.doFilter(LogTraceFilter.java:39)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at org.springblade.core.boot.request.BladeRequestFilter.doFilter(BladeRequestFilter.java:58)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at brave.servlet.TracingFilter.doFilter(TracingFilter.java:87)

at org.springframework.cloud.sleuth.instrument.web.LazyTracingFilter.doFilter(TraceWebServletAutoConfiguration.java:141)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:97)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)

at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)

at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)

at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)

at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)

at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:111)

at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)

at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)

at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)

at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)

at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)

at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)

at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)

at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)

at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)

at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)

at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)

at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)

at io.undertow.server.Connectors.executeRootHandler(Connectors.java:390)

at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:836)

at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)

at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019)

at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558)

at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1449)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.OutOfMemoryError: Java heap space

org.springframework.web.util.NestedServletException Handler dispatch failed; nested exception is java.lang.OutOfMemoryError: Java heap space 1055 47.111.186.190 org.springframework.web.servlet.DispatcherServlet DispatcherServlet.java doDispatch {"batchNo":"B-16-8-220507-9","createUser":"1518113334770122754","deviceCode":"E2205050004","factoryId":"91","model":1,"secondtestDataDetailList":[{"ID":961,"address0":16319791,"aisle":"01","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":934,"idHex":"0003C1","idLong":0,"innerCode":"220549069E35","repeat":false,"resistant":827,"time":0,"type":2},{"ID":962,"address0":1770799,"aisle":"02","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":913,"idHex":"0003C2","idLong":0,"innerCode":"22051F0A3BC9","repeat":false,"resistant":816,"time":0,"type":2},{"ID":963,"address0":4523311,"aisle":"03","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":996,"idHex":"0003C3","idLong":0,"innerCode":"22051F0A3BC1","repeat":false,"resistant":814,"time":0,"type":2},{"ID":964,"address0":12977455,"aisle":"04","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":987,"idHex":"0003C4","idLong":0,"innerCode":"22051F0A3C9A","repeat":false,"resistant":769,"time":0,"type":2},{"ID":965,"address0":9962799,"aisle":"05","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":938,"idHex":"0003C5","idLong":0,"innerCode":"22054A069988","repeat":false,"resistant":781,"time":0,"type":2},{"ID":966,"address0":7996719,"aisle":"06","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":901,"idHex":"0003C6","idLong":0,"innerCode":"220549069E2D","repeat":false,"resistant":822,"time":0,"type":2},{"ID":967,"address0":2360623,"aisle":"07","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":967,"idHex":"0003C7","idLong":0,"innerCode":"22051F0A3BC3","repeat":false,"resistant":828,"time":0,"type":2},{"ID":968,"address0":6620463,"aisle":"08","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":983,"idHex":"0003C8","idLong":0,"innerCode":"22052009FC19","repeat":false,"resistant":826,"time":0,"type":2},{"ID":969,"address0":3867951,"aisle":"09","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":934,"idHex":"0003C9","idLong":0,"innerCode":"220549069E38","repeat":false,"resistant":790,"time":0,"type":2},{"ID":970,"address0":14222639,"aisle":"10","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":962,"idHex":"0003CA","idLong":0,"innerCode":"220549069E3D","repeat":false,"resistant":802,"time":0,"type":2},{"ID":911,"address0":10487087,"aisle":"11","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":954,"idHex":"00038F","idLong":0,"innerCode":"22054A06998C","repeat":false,"resistant":805,"time":0,"type":2},{"ID":912,"address0":8127791,"aisle":"12","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":942,"idHex":"000390","idLong":0,"innerCode":"22054A069991","repeat":false,"resistant":790,"time":0,"type":2},{"ID":913,"address0":2229551,"aisle":"13","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":942,"idHex":"000391","idLong":0,"innerCode":"220549069E2E","repeat":false,"resistant":782,"time":0,"type":2},{"ID":914,"address0":12584239,"aisle":"14","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":971,"idHex":"000392","idLong":0,"innerCode":"22052009FC20","repeat":false,"resistant":826,"time":0,"type":2},{"ID":915,"address0":10356015,"aisle":"15","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":954,"idHex":"000393","idLong":0,"innerCode":"22052009FC1F","repeat":false,"resistant":812,"time":0,"type":2},{"ID":916,"address0":1901871,"aisle":"16","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":863,"idHex":"000394","idLong":0,"innerCode":"220549069E3B","repeat":false,"resistant":810,"time":0,"type":2},{"ID":917,"address0":4392239,"aisle":"17","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":1004,"idHex":"000395","idLong":0,"innerCode":"220549069E37","repeat":false,"resistant":830,"time":0,"type":2},{"ID":918,"address0":10552623,"aisle":"18","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":938,"idHex":"000396","idLong":0,"innerCode":"22052009FC23","repeat":false,"resistant":797,"time":0,"type":2},{"ID":919,"address0":16713007,"aisle":"19","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":950,"idHex":"000397","idLong":0,"innerCode":"22051F0A3BCE","repeat":false,"resistant":804,"time":0,"type":2},{"ID":920,"address0":12453167,"aisle":"20","checkResult":0,"errorType":0,"firstNoData":false,"highCurrent":934,"idHex":"000398","idLong":0,"innerCode":"22051F0A3BCB","repeat":false,"resistant":810,"time":0,"type":2}],"testNumber":6108,"time":1652321701114} 2022-05-12 10:17:45

五、若有更多详细信息,请在下面提供。





1条回答
  • 这种内存不足问题 一般需要jvisualvm(远程/本地)分析 

    jvisualvm教程: https://read01.com/J2JAG5.html#.YnzwcehBxPY


    或者用jvisualvm本地分析dump文件


    dump文件自动导出jvm参数:

    -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp


    dump文件手动导出参考:https://www.cnblogs.com/sxdcgaq8080/p/11089664.html

    0 讨论(0)
提交回复