{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6796","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6796/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6796/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6796/events","html_url":"https://github.com/orientechnologies/orientdb/issues/6796","id":182031991,"number":6796,"title":" java.lang.OutOfMemoryError: GC overhead limit exceeded","user":{"login":"vlasni","id":19346364,"avatar_url":"https://avatars.githubusercontent.com/u/19346364?v=3","gravatar_id":"","url":"https://api.github.com/users/vlasni","html_url":"https://github.com/vlasni","followers_url":"https://api.github.com/users/vlasni/followers","following_url":"https://api.github.com/users/vlasni/following{/other_user}","gists_url":"https://api.github.com/users/vlasni/gists{/gist_id}","starred_url":"https://api.github.com/users/vlasni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlasni/subscriptions","organizations_url":"https://api.github.com/users/vlasni/orgs","repos_url":"https://api.github.com/users/vlasni/repos","events_url":"https://api.github.com/users/vlasni/events{/privacy}","received_events_url":"https://api.github.com/users/vlasni/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"maggiolo00","id":98812,"avatar_url":"https://avatars.githubusercontent.com/u/98812?v=3","gravatar_id":"","url":"https://api.github.com/users/maggiolo00","html_url":"https://github.com/maggiolo00","followers_url":"https://api.github.com/users/maggiolo00/followers","following_url":"https://api.github.com/users/maggiolo00/following{/other_user}","gists_url":"https://api.github.com/users/maggiolo00/gists{/gist_id}","starred_url":"https://api.github.com/users/maggiolo00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggiolo00/subscriptions","organizations_url":"https://api.github.com/users/maggiolo00/orgs","repos_url":"https://api.github.com/users/maggiolo00/repos","events_url":"https://api.github.com/users/maggiolo00/events{/privacy}","received_events_url":"https://api.github.com/users/maggiolo00/received_events","type":"User","site_admin":false},"assignees":[{"login":"maggiolo00","id":98812,"avatar_url":"https://avatars.githubusercontent.com/u/98812?v=3","gravatar_id":"","url":"https://api.github.com/users/maggiolo00","html_url":"https://github.com/maggiolo00","followers_url":"https://api.github.com/users/maggiolo00/followers","following_url":"https://api.github.com/users/maggiolo00/following{/other_user}","gists_url":"https://api.github.com/users/maggiolo00/gists{/gist_id}","starred_url":"https://api.github.com/users/maggiolo00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggiolo00/subscriptions","organizations_url":"https://api.github.com/users/maggiolo00/orgs","repos_url":"https://api.github.com/users/maggiolo00/repos","events_url":"https://api.github.com/users/maggiolo00/events{/privacy}","received_events_url":"https://api.github.com/users/maggiolo00/received_events","type":"User","site_admin":false}],"milestone":null,"comments":22,"created_at":"2016-10-10T14:40:05Z","updated_at":"2016-10-17T11:04:05Z","closed_at":"2016-10-17T11:04:04Z","body":"## OrientDB Version, operating system, or hardware.\r\n- v2.2.12-SNAPSHOT\r\n\r\n## Operating System\r\n- Linux\r\n\r\n## Expected behavior and actual behavior\r\nI have a query I have tried to optimize but haven't been able to, it is extremely slow.\r\nQuery is this one below:\r\n\r\n```\r\nselect count(*) from (select expand(inE('isClientOf').outV()) from #33:1)\r\nwhere status in ['ACTIVE','INACTIVE']\r\nand @rid in (select out from installs where unInstallDate is null and active=true) \r\nand deleted=false\r\n```\r\nSchema related to this query is:\r\n- v:Consumer e:isClientOf v:Vendor (#33:1)\r\n- v:Consumer e:installs v:Installation\r\n\r\n\r\n## Steps to reproduce the problem\r\nIf I run the query above with nobody else accessing DB, then it takes a loooong time to complete. But when applications are accessing DB, and try to execute the query from Studio, then two things happen:\r\n- Studio does not execute it but displays message \"GC overhead limit exceeded\"\r\n- Running applications accessing DB start to fail as reported in the log below.\r\n```\r\n2016-10-10 11:06:15.740 [http-nio-9090-exec-24] ERROR com.develance.vlastni.api.resource.ConsumerResource 122 createConsumer - com.orientechnologies.orient.core.exception.OStorageException: Error$\r\n        DB name=\"vlasni3\"\r\n        DB name=\"vlasni3\" com.orientechnologies.orient.core.exception.OStorageException: Error in data flush background thread, please restart database and send full stack trace inside of bug rep$\r\n        DB name=\"vlasni3\"\r\n        DB name=\"vlasni3\"\r\n        at sun.reflect.GeneratedConstructorAccessor109.newInstance(Unknown Source) ~[?:?]\r\n        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_101]\r\n        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_101]\r\n        at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.throwSerializedException(OChannelBinaryAsynchClient.java:428) ~[orientdb-client-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:379) ~[orientdb-client-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:261) ~[orientdb-client-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.client.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:153) ~[orientdb-client-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:2132) ~[orientdb-client-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.client.remote.OStorageRemote$28.execute(OStorageRemote.java:1314) ~[orientdb-client-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.client.remote.OStorageRemote$28.execute(OStorageRemote.java:1287) ~[orientdb-client-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.client.remote.OStorageRemote$2.execute(OStorageRemote.java:196) ~[orientdb-client-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.client.remote.OStorageRemote.baseNetworkOperation(OStorageRemote.java:228) ~[orientdb-client-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.client.remote.OStorageRemote.networkOperation(OStorageRemote.java:193) ~[orientdb-client-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.client.remote.OStorageRemote.commit(OStorageRemote.java:1287) ~[orientdb-client-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:560) ~[orientdb-core-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:106) ~[orientdb-core-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2710) ~[orientdb-core-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2679) ~[orientdb-core-2.2.11.jar:2.2.11]\r\n        at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:175) ~[orientdb-graphdb-2.2.11.jar:2.2.11]\r\n        at com.develance.vlastni.api.resource.helper.ConsumerResourceHelperImpl.getOrCreateConsumer(ConsumerResourceHelperImpl.java:389) ~[ConsumerResourceHelperImpl.class:?]\r\n        at com.develance.vlastni.api.resource.ConsumerResource.createConsumer(ConsumerResource.java:110) [ConsumerResource.class:?]\r\n        at com.develance.vlastni.api.resource.ConsumerResource.addConsumer(ConsumerResource.java:95) [ConsumerResource.class:?]\r\n        at com.develance.vlastni.api.resource.ConsumerResource$$FastClassBySpringCGLIB$$40f84119.invoke(<generated>) [spring-core-3.2.13.RELEASE.jar:?]\r\n        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-3.2.13.RELEASE.jar:3.2.13.RELEASE]\r\n        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:629) [spring-aop-3.2.13.RELEASE.jar:3.2.13.RELEASE]\r\n        at com.develance.vlastni.api.resource.ConsumerResource$$EnhancerBySpringCGLIB$$987a3733.addConsumer(<generated>) [spring-core-3.2.13.RELEASE.jar:?]\r\n        at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source) ~[?:?]\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101]\r\n        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_101]\r\n        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server.jar:?]\r\n        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151) [jersey-server.jar:?]\r\n        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171) [jersey-server.jar:?]\r\n        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:195) [jersey-server.jar:?]\r\n        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104) [jersey-server.jar:?]\r\n        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387) [jersey-server.jar:?]\r\n        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331) [jersey-server.jar:?]\r\n        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103) [jersey-server.jar:?]\r\n        at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271) [jersey-server.jar:?]\r\n        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common.jar:?]\r\n        at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common.jar:?]\r\n        at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common.jar:?]\r\n        at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common.jar:?]\r\n        at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common.jar:?]\r\n        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297) [jersey-common.jar:?]\r\n        at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254) [jersey-server.jar:?]\r\n        at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1030) [jersey-server.jar:?]\r\n        at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373) [jersey-container-servlet-core.jar:?]\r\n        at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381) [jersey-container-servlet-core.jar:?]\r\n        at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344) [jersey-container-servlet-core.jar:?]\r\n        at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221) [jersey-container-servlet-core.jar:?]\r\n        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.20]\r\n        at com.develance.vlastni.api.db.DBControlFilter.doFilter(DBControlFilter.java:26) [com.develance.vlastni.common-0.0.2-SNAPSHOT.jar:?]\r\n        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.20]\r\n        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.20]\r\n        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:438) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:179) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.20]\r\n        at com.develance.vlastni.api.auth.AuthFilter.doFilter(AuthFilter.java:57) [AuthFilter.class:?]\r\n        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.20]\r\n        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516) [catalina.jar:8.0.20]\r\n        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086) [tomcat-coyote.jar:8.0.20]\r\n        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659) [tomcat-coyote.jar:8.0.20]\r\n        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) [tomcat-coyote.jar:8.0.20]\r\n        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558) [tomcat-coyote.jar:8.0.20]\r\n        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515) [tomcat-coyote.jar:8.0.20]\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_101]\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_101]\r\n        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.20]\r\n        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]\r\nCaused by: java.lang.OutOfMemoryError: GC overhead limit exceeded\r\n        at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.flushPage(OWOWCache.java:1310) ~[orientdb-core-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.access$2800(OWOWCache.java:72) ~[orientdb-core-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.core.storage.cache.local.OWOWCache$PeriodicFlushTask.iterateByCacheSubRing(OWOWCache.java:1705) ~[orientdb-core-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.core.storage.cache.local.OWOWCache$PeriodicFlushTask.iterateBySubRing(OWOWCache.java:1576) ~[orientdb-core-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.core.storage.cache.local.OWOWCache$PeriodicFlushTask.flushRing(OWOWCache.java:1515) ~[orientdb-core-2.2.11.jar:2.2.11]\r\n        at com.orientechnologies.orient.core.storage.cache.local.OWOWCache$PeriodicFlushTask.run(OWOWCache.java:1474) ~[orientdb-core-2.2.11.jar:2.2.11]\r\n        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_101]\r\n        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:1.8.0_101]\r\n        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_101]\r\n        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:1.8.0_101]\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_101]\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_101]\r\n        ... 1 more\r\n```\r\nI understand this could be avoided if the query could be optimized in order to get a reasonable response time.\r\nAny tips on how to improve this query?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/254177784","html_url":"https://github.com/orientechnologies/orientdb/issues/6796#issuecomment-254177784","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6796","id":254177784,"user":{"login":"maggiolo00","id":98812,"avatar_url":"https://avatars.githubusercontent.com/u/98812?v=3","gravatar_id":"","url":"https://api.github.com/users/maggiolo00","html_url":"https://github.com/maggiolo00","followers_url":"https://api.github.com/users/maggiolo00/followers","following_url":"https://api.github.com/users/maggiolo00/following{/other_user}","gists_url":"https://api.github.com/users/maggiolo00/gists{/gist_id}","starred_url":"https://api.github.com/users/maggiolo00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggiolo00/subscriptions","organizations_url":"https://api.github.com/users/maggiolo00/orgs","repos_url":"https://api.github.com/users/maggiolo00/repos","events_url":"https://api.github.com/users/maggiolo00/events{/privacy}","received_events_url":"https://api.github.com/users/maggiolo00/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T11:04:05Z","updated_at":"2016-10-17T11:04:05Z","body":"@vlasni \n\ni'm closing this.\n\nIf you have issues with Graph Editor you can raise issues here\n\nhttps://github.com/orientechnologies/orientdb-studio\n\nThanks"}}
{"actor":{"display_login":"maggiolo00"}}