Караф из-за ошибки памяти
Я использую Karaf 2.3.0 для развертывания моих комплектов активатора OSGi и выставления моих удаленных сервисов как включенных отдыха. Thigs работают нормально. Только однажды я получил ошибку нехватки памяти в журналах karaf (прикрепление журналов), после чего я не смог получить доступ к обслуживаемому мне отдыху. Когда я взял дамп кучи и потока после часа сбоя сервера (мой процесс karaf все еще работает даже после ошибки OOMemory), я не смог найти ничего большого в дампах. Проверял процесс с помощью jvisualvm (процесс karaf Xmx-1024 МБ), а потребление памяти и процессора - минимальный минимум. Но я не могу получить доступ ни к одному из моих сервисов. Попытка доступа к службам продолжается без ошибок в течение нескольких минут до истечения времени ожидания. Я не вижу, чтобы журнал сервера выводил какие-либо признаки моего доступа. Разве процесс не должен останавливаться, как только возникает ошибка out of mem? Как я могу определить, что могло вызвать проблему? Прикрепление журналов ниже
2014-07-16 12:19:51,461 | WARN | qtp1863802945-52 | ServletHandler | lipse.jetty.util.log.JavaUtilLog 70 | 52 - org.eclipse.jetty.util - 7.6.7.v20120910 | /services/alertThreshold/F5/VirtualServer
java.lang.reflect.UndeclaredThrowableException
at org.ops4j.pax.web.service.internal.$Proxy11.service(Unknown Source)[69:org.ops4j.pax.web.pax-web-runtime:1.1.3]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[60:org.eclipse.jetty.servlet:7.6.7.v20120910]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)[60:org.eclipse.jetty.servlet:7.6.7.v20120910]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[70:org.ops4j.pax.web.pax-web-jetty:1.1.3]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)[59:org.eclipse.jetty.security:7.6.7.v20120910]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[70:org.ops4j.pax.web.pax-web-jetty:1.1.3]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)[60:org.eclipse.jetty.servlet:7.6.7.v20120910]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:74)[70:org.ops4j.pax.web.pax-web-jetty:1.1.3]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.Server.handle(Server.java:363)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)[54:org.eclipse.jetty.http:7.6.7.v20120910]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)[54:org.eclipse.jetty.http:7.6.7.v20120910]
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)[53:org.eclipse.jetty.io:7.6.7.v20120910]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)[53:org.eclipse.jetty.io:7.6.7.v20120910]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[52:org.eclipse.jetty.util:7.6.7.v20120910]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[52:org.eclipse.jetty.util:7.6.7.v20120910]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_17]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_17]
at org.ops4j.pax.web.service.internal.HttpServiceStarted$2.invoke(HttpServiceStarted.java:210)[69:org.ops4j.pax.web.pax-web-runtime:1.1.3]
... 27 more
Caused by: javax.servlet.ServletException: java.lang.OutOfMemoryError: Java heap space
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)[93:com.sun.jersey.servlet:1.15.0]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)[93:com.sun.jersey.servlet:1.15.0]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)[93:com.sun.jersey.servlet:1.15.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)[51:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
... 32 more
Caused by: java.lang.OutOfMemoryError: Java heap space
2014-07-16 12:19:51,460 | WARN | 2.168.31.36:5000 | cluster | verMonitor$ServerMonitorRunnable 117 | 115 - org.db.mongo - 1.0.0.201407140926 | Exception in monitor thread during notification of server state change
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOf(Arrays.java:2367)[:1.7.0_17]
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)[:1.7.0_17]
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)[:1.7.0_17]
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)[:1.7.0_17]
at java.lang.StringBuilder.append(StringBuilder.java:132)[:1.7.0_17]
at com.mongodb.ServerDescription.getShortDescription(ServerDescription.java:467)[115:org.db.mongo:1.0.0.201407140926]
at com.mongodb.ClusterDescription.getShortDescription(ClusterDescription.java:191)[115:org.db.mongo:1.0.0.201407140926]
at com.mongodb.BaseCluster.updateDescription(BaseCluster.java:158)[115:org.db.mongo:1.0.0.201407140926]
at com.mongodb.MultiServerCluster.updateDescription(MultiServerCluster.java:240)[115:org.db.mongo:1.0.0.201407140926]
at com.mongodb.MultiServerCluster.onChange(MultiServerCluster.java:149)[115:org.db.mongo:1.0.0.201407140926]
at com.mongodb.MultiServerCluster.access$100(MultiServerCluster.java:40)[115:org.db.mongo:1.0.0.201407140926]
at com.mongodb.MultiServerCluster$DefaultServerStateListener.stateChanged(MultiServerCluster.java:111)[115:org.db.mongo:1.0.0.201407140926]
at com.mongodb.DefaultServer$DefaultServerStateListener.stateChanged(DefaultServer.java:104)[115:org.db.mongo:1.0.0.201407140926]
at com.mongodb.ServerMonitor$ServerMonitorRunnable.run(ServerMonitor.java:114)[115:org.db.mongo:1.0.0.201407140926]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_17]
2014-07-16 12:19:51,458 | ERROR | qtp1863802945-55 | ContainerResponse | .spi.container.ContainerResponse 406 | 92 - com.sun.jersey.jersey-server - 1.15.0 | The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container
java.lang.OutOfMemoryError: Java heap space
at sun.nio.cs.UTF_8.newDecoder(UTF_8.java:68)[:1.7.0_17]
at java.lang.StringCoding$StringDecoder.<init>(StringCoding.java:131)[:1.7.0_17]
at java.lang.StringCoding$StringDecoder.<init>(StringCoding.java:122)[:1.7.0_17]
at java.lang.StringCoding.decode(StringCoding.java:187)[:1.7.0_17]
at java.lang.String.<init>(String.java:416)[:1.7.0_17]
at org.bson.BasicBSONDecoder$BSONInput.readUTF8String(BasicBSONDecoder.java:544)
at org.bson.BasicBSONDecoder.decodeElement(BasicBSONDecoder.java:230)
at org.bson.BasicBSONDecoder._decode(BasicBSONDecoder.java:154)
at org.bson.BasicBSONDecoder.decode(BasicBSONDecoder.java:132)
at com.mongodb.DefaultDBDecoder.decode(DefaultDBDecoder.java:62)
at com.mongodb.Response.<init>(Response.java:85)
at com.mongodb.DBPort$1.execute(DBPort.java:141)
at com.mongodb.DBPort$1.execute(DBPort.java:135)
at com.mongodb.DBPort.doOperation(DBPort.java:164)
at com.mongodb.DBPort.call(DBPort.java:135)
at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:292)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:271)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:237)
at com.mongodb.QueryResultIterator.getMore(QueryResultIterator.java:137)
at com.mongodb.QueryResultIterator.hasNext(QueryResultIterator.java:127)
at com.mongodb.DBCursor._hasNext(DBCursor.java:551)
at com.mongodb.DBCursor.hasNext(DBCursor.java:571)
at com.testing.apptest.search.dao.ObjectSearchDao.getObjects(ObjectSearchDao.java:1648)
at com.testing.apptest.core.service.ObjectDictionaryManagement.getObjectList(ObjectDictionaryManagement.java:572)
at com.testing.apptest.core.service.ObjectDictionaryManagement.getObjectDict(ObjectDictionaryManagement.java:358)
at com.testing.apptest.core.service.alertSettings.ThresholdSettingsManagement.getObjectList(ThresholdSettingsManagement.java:239)
at com.testing.apptest.rest.ThresholdSettingsRest.getDeviceList(ThresholdSettingsRest.java:315)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_17]
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)[92:com.sun.jersey.jersey-server:1.15.0]
2014-07-16 12:19:51,457 | ERROR | qtp1863802945-57 | ContainerResponse | .spi.container.ContainerResponse 406 | 92 - com.sun.jersey.jersey-server - 1.15.0 | The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container
java.lang.OutOfMemoryError: GC overhead limit exceeded
2014-07-16 12:19:52,669 | WARN | qtp1863802945-57 | ServletHandler | lipse.jetty.util.log.JavaUtilLog 70 | 52 - org.eclipse.jetty.util - 7.6.7.v20120910 | /services/notificationCenter
java.lang.reflect.UndeclaredThrowableException
at org.ops4j.pax.web.service.internal.$Proxy11.service(Unknown Source)[69:org.ops4j.pax.web.pax-web-runtime:1.1.3]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[60:org.eclipse.jetty.servlet:7.6.7.v20120910]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)[60:org.eclipse.jetty.servlet:7.6.7.v20120910]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[70:org.ops4j.pax.web.pax-web-jetty:1.1.3]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)[59:org.eclipse.jetty.security:7.6.7.v20120910]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[70:org.ops4j.pax.web.pax-web-jetty:1.1.3]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)[60:org.eclipse.jetty.servlet:7.6.7.v20120910]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:74)[70:org.ops4j.pax.web.pax-web-jetty:1.1.3]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.Server.handle(Server.java:363)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)[54:org.eclipse.jetty.http:7.6.7.v20120910]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)[54:org.eclipse.jetty.http:7.6.7.v20120910]
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)[53:org.eclipse.jetty.io:7.6.7.v20120910]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)[53:org.eclipse.jetty.io:7.6.7.v20120910]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[52:org.eclipse.jetty.util:7.6.7.v20120910]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[52:org.eclipse.jetty.util:7.6.7.v20120910]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_17]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_17]
at org.ops4j.pax.web.service.internal.HttpServiceStarted$2.invoke(HttpServiceStarted.java:210)[69:org.ops4j.pax.web.pax-web-runtime:1.1.3]
... 27 more
Caused by: javax.servlet.ServletException: java.lang.OutOfMemoryError: GC overhead limit exceeded
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)[93:com.sun.jersey.servlet:1.15.0]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)[93:com.sun.jersey.servlet:1.15.0]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)[93:com.sun.jersey.servlet:1.15.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)[51:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
... 32 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
2014-07-16 12:19:52,669 | WARN | qtp1863802945-55 | ServletHandler | lipse.jetty.util.log.JavaUtilLog 70 | 52 - org.eclipse.jetty.util - 7.6.7.v20120910 | /services/alertThreshold/F5/WideIp
java.lang.reflect.UndeclaredThrowableException
at org.ops4j.pax.web.service.internal.$Proxy11.service(Unknown Source)[69:org.ops4j.pax.web.pax-web-runtime:1.1.3]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)[60:org.eclipse.jetty.servlet:7.6.7.v20120910]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:447)[60:org.eclipse.jetty.servlet:7.6.7.v20120910]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[70:org.ops4j.pax.web.pax-web-jetty:1.1.3]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)[59:org.eclipse.jetty.security:7.6.7.v20120910]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[70:org.ops4j.pax.web.pax-web-jetty:1.1.3]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)[60:org.eclipse.jetty.servlet:7.6.7.v20120910]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:74)[70:org.ops4j.pax.web.pax-web-jetty:1.1.3]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.Server.handle(Server.java:363)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)[54:org.eclipse.jetty.http:7.6.7.v20120910]
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)[54:org.eclipse.jetty.http:7.6.7.v20120910]
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)[58:org.eclipse.jetty.server:7.6.7.v20120910]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)[53:org.eclipse.jetty.io:7.6.7.v20120910]
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)[53:org.eclipse.jetty.io:7.6.7.v20120910]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)[52:org.eclipse.jetty.util:7.6.7.v20120910]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)[52:org.eclipse.jetty.util:7.6.7.v20120910]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_17]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_17]
at org.ops4j.pax.web.service.internal.HttpServiceStarted$2.invoke(HttpServiceStarted.java:210)[69:org.ops4j.pax.web.pax-web-runtime:1.1.3]
... 27 more
Caused by: javax.servlet.ServletException: java.lang.OutOfMemoryError: Java heap space
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)[93:com.sun.jersey.servlet:1.15.0]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)[93:com.sun.jersey.servlet:1.15.0]
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)[93:com.sun.jersey.servlet:1.15.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)[51:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]
... 32 more
Caused by: java.lang.OutOfMemoryError: Java heap space
at sun.nio.cs.UTF_8.newDecoder(UTF_8.java:68)[:1.7.0_17]
at java.lang.StringCoding$StringDecoder.<init>(StringCoding.java:131)[:1.7.0_17]
at java.lang.StringCoding$StringDecoder.<init>(StringCoding.java:122)[:1.7.0_17]
at java.lang.StringCoding.decode(StringCoding.java:187)[:1.7.0_17]
at java.lang.String.<init>(String.java:416)[:1.7.0_17]
at org.bson.BasicBSONDecoder$BSONInput.readUTF8String(BasicBSONDecoder.java:544)
at org.bson.BasicBSONDecoder.decodeElement(BasicBSONDecoder.java:230)
at org.bson.BasicBSONDecoder._decode(BasicBSONDecoder.java:154)
at org.bson.BasicBSONDecoder.decode(BasicBSONDecoder.java:132)
at com.mongodb.DefaultDBDecoder.decode(DefaultDBDecoder.java:62)
at com.mongodb.Response.<init>(Response.java:85)
at com.mongodb.DBPort$1.execute(DBPort.java:141)
at com.mongodb.DBPort$1.execute(DBPort.java:135)
at com.mongodb.DBPort.doOperation(DBPort.java:164)
at com.mongodb.DBPort.call(DBPort.java:135)
at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:292)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:271)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:237)
at com.mongodb.QueryResultIterator.getMore(QueryResultIterator.java:137)
at com.mongodb.QueryResultIterator.hasNext(QueryResultIterator.java:127)
at com.mongodb.DBCursor._hasNext(DBCursor.java:551)
at com.mongodb.DBCursor.hasNext(DBCursor.java:571)
at com.testing.apptest.search.dao.ObjectSearchDao.getObjects(ObjectSearchDao.java:1648)
at com.testing.apptest.core.service.ObjectDictionaryManagement.getObjectList(ObjectDictionaryManagement.java:572)
at com.testing.apptest.core.service.ObjectDictionaryManagement.getObjectDict(ObjectDictionaryManagement.java:358)
at com.testing.apptest.core.service.alertSettings.ThresholdSettingsManagement.getObjectList(ThresholdSettingsManagement.java:239)
at com.testing.apptest.rest.ThresholdSettingsRest.getDeviceList(ThresholdSettingsRest.java:315)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601)[:1.7.0_17]
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)[92:com.sun.jersey.jersey-server:1.15.0]
2 ответа
Вы можете установить Xmx (JAVA_MAX_MEM и JAVA_MAX_PERM_MEM) в $KARAF_HOME/bin/setenv
Прежде всего, процесс не должен останавливаться после ошибки OOME. OutOfMemoryError является Throwable и поэтому может обрабатываться виртуальной машиной. В вашем случае рассматриваемый пакет был удален, и, следовательно, потребление памяти снова в порядке. Вам нужно будет перезапустить приложение Bundle и, возможно, Pax Web. Что касается вашего исключения, я видел, что есть проблема с ArrayCopy, у вас, похоже, много "больших" объектов в вашем приложении, может быть, просто увеличения Heap-Size уже достаточно.