2

我的网站有时会被阻止并且每隔几次都无法正常工作(有时它可以正常工作很长时间,使用相同的代码),得到我在下面显示的日志。每次发生这种情况,我必须去我的控制台,刷新缓存,并将前端实例类的应用程序设置从 F1 更改为 F2 或 F4 以使第一次加载成为可能,一旦完成,又改回 F1 (在第一次请求后完美运行)。但过了一会儿,我又遇到了服务器错误,我的网站无法正常工作。

...Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36" ms=60615 cpu_ms=41418 loading_request=1 exit_code=104 app_engine_release=1.8.4 instance=00c61b117cd6a25994d15ffe59bc99e20e5cb2bb
    I 2013-09-06 17:06:12.201
    javax.servlet.ServletContext log: Initializing Spring root WebApplicationContext
    I 2013-09-06 17:06:50.336
    javax.servlet.ServletContext log: Initializing Spring FrameworkServlet 'mvc-dispatcher'
    E 2013-09-06 17:07:03.075
    org.springframework.web.servlet.FrameworkServlet initServletBean: Context initialization failed
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/base/data/home/apps/s~comprarebookhoy/1.370036978402952713/WEB-INF/lib/objectify-4.0b2.jar!/com/googlecode/objectify/repackaged/gentyref/CaptureType.class]; nested exception is com.google.apphosting.api.DeadlineExceededException: This request (1de39e8e35c0b3f7) started at 2013/09/07 00:06:03.615 UTC and was still executing at 2013/09/07 00:07:03.073 UTC.
        at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:261)
        at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242)
        at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)
        at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1431)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1421)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:535)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:449)
        at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:638)
        at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:595)
        at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:652)
        at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:514)
        at org.springframework.web.servlet.FrameworkServlet.**initServletBean(FrameworkServlet.java:455)**
        at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
        at javax.servlet.GenericServlet.init(GenericServlet.java:212)
        at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
        at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:219)
        at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:194)
        at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:134)
        at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:439)
        at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:435)
        at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:442)
        at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:186)
        at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:306)
        at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:298)
        at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:439)
        at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
        at java.lang.Thread.run(Thread.java:722)
    Caused by: com.google.apphosting.api.**DeadlineExceededException: **This request (1de39e8e35c0b3f7) started at 2013/09/07 00:06:03.615 UTC and was still executing at** 2013/09/07 00:07:03.073 UTC.**
        at java.security.AccessController.doPrivileged(Native Method)
        at java.io.FilePermission.init(FilePermission.java:209)
        at java.io.FilePermission.<init>(FilePermission.java:285)
        at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
        at java.util.zip.ZipFile.<init>(ZipFile.java:217)
        at java.util.zip.ZipFile.<init>(ZipFile.java:156)
        at java.util.jar.JarFile.<init>(JarFile.java:153)
        at java.util.jar.JarFile.<init>(JarFile.java:90)
        at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
        at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
        at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:88)
        at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
        at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:150)
        at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:125)
        at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:49)
        at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
        at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
        at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:237)
        ... 48 more
    E 2013-09-06 17:07:03.077
    javax.servlet.ServletContext log: unavailable
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/base/data/home/apps/s~comprarebookhoy/1.370036978402952713/WEB-INF/lib/objectify-4.0b2.jar!/com/googlecode/objectify/repackaged/gentyref/CaptureType.class]; nested exception is com.google.apphosting.api.DeadlineExceededException: This request (1de39e8e35c0b3f7) started at 2013/09/07 00:06:03.615 UTC and was still executing at 2013/09/07 00:07:03.073 UTC.
        at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:261)
        at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242)
        at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)
        at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1431)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1421)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:184)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:111)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:535)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:449)
        at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:638)
        at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:595)
        at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:652)
        at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:514)
        at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:455)
        at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
        at javax.servlet.GenericServlet.init(GenericServlet.java:212)
        at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
        at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:219)
        at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:194)
        at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:134)
        at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:439)
        at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:435)
        at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:442)
        at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:186)
        at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:306)
        at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:298)
        at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:439)
        at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
        at java.lang.Thread.run(Thread.java:722)
    Caused by: com.google.apphosting.api.DeadlineExceededException: This request (1de39e8e35c0b3f7) started at 2013/09/07 00:06:03.615 UTC and was still executing at 2013/09/07 00:07:03.073 UTC.
        at java.security.AccessController.doPrivileged(Native Method)
        at java.io.FilePermission.init(FilePermission.java:209)
        at java.io.FilePermission.<init>(FilePermission.java:285)
        at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
        at java.util.zip.ZipFile.<init>(ZipFile.java:217)
        at java.util.zip.ZipFile.<init>(ZipFile.java:156)
        at java.util.jar.JarFile.<init>(JarFile.java:153)
        at java.util.jar.JarFile.<init>(JarFile.java:90)
        at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
        at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
        at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:88)
        at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
        at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:150)
        at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:125)
        at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:49)
        at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
        at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:101)
        at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:237)
        ... 48 more
    W 2013-09-06 17:07:03.122
    (my url)
    javax.servlet.ServletException: com.google.apphosting.api.ApiProxy$CancelledException: **The API call memcache.Get() was explicitly cancelled**.
        at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:268)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
        at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:146)
        at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:439)
        at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:435)
        at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:442)
        at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:186)
        at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:306)
        at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:298)
        at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:439)
        at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
        at java.lang.Thread.run(Thread.java:722)
    Caused by: com.google.apphosting.api.ApiProxy$CancelledException: The API call memcache.Get() was explicitly cancelled.
        at com.google.apphosting.runtime.ApiProxyImpl$5.get(ApiProxyImpl.java:386)
        at com.google.apphosting.runtime.ApiProxyImpl$5.get(ApiProxyImpl.java:383)
        at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:90)
        at com.google.appengine.api.memcache.MemcacheServiceImpl.quietGet(MemcacheServiceImpl.java:28)
        at com.google.appengine.api.memcache.MemcacheServiceImpl.get(MemcacheServiceImpl.java:51)
        at com.google.apphosting.runtime.jetty.MemcacheSessionStore.getSession(MemcacheSessionStore.java:36)
        at com.google.apphosting.runtime.jetty.SessionManager.loadSession(SessionManager.java:327)
        at com.google.apphosting.runtime.jetty.SessionManager.getSession(SessionManager.java:301)
        at org.mortbay.jetty.servlet.AbstractSessionManager.getHttpSession(AbstractSessionManager.java:237)
        at org.mortbay.jetty.servlet.SessionHandler.setRequestedId(SessionHandler.java:246)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:136)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:266)
        ... 16 more
    W 2013-09-06 17:07:03.123
    Nested in javax.servlet.ServletException: com.google.apphosting.api.ApiProxy$CancelledException: The API call memcache.Get() was explicitly cancelled.:
    com.google.apphosting.api.ApiProxy$CancelledException: The API call memcache.Get() was explicitly cancelled.
        at com.google.apphosting.runtime.ApiProxyImpl$5.get(ApiProxyImpl.java:386)
        at com.google.apphosting.runtime.ApiProxyImpl$5.get(ApiProxyImpl.java:383)
        at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:90)
        at com.google.appengine.api.memcache.MemcacheServiceImpl.quietGet(MemcacheServiceImpl.java:28)
        at com.google.appengine.api.memcache.MemcacheServiceImpl.get(MemcacheServiceImpl.java:51)
        at com.google.apphosting.runtime.jetty.MemcacheSessionStore.getSession(MemcacheSessionStore.java:36)
        at com.google.apphosting.runtime.jetty.SessionManager.loadSession(SessionManager.java:327)
        at com.google.apphosting.runtime.jetty.SessionManager.getSession(SessionManager.java:301)
        at org.mortbay.jetty.servlet.AbstractSessionManager.getHttpSession(AbstractSessionManager.java:237)
        at org.mortbay.jetty.servlet.SessionHandler.setRequestedId(SessionHandler.java:246)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:136)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:266)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
        at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:146)
        at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:439)
        at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:435)
        at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:442)
        at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:186)
        at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:306)
        at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:298)
        at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:439)
        at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
        at java.lang.Thread.run(Thread.java:722)
    I 2013-09-06 17:07:03.131
    This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.
    W 2013-09-06 17:07:03.131
    A problem was encountered with the process that handled this request, causing it to exit. This is likely to cause a new process to be used for the next request to your application. If you see this message frequently, you may be throwing exceptions during the initialization of your application. (Error code 104)

在我的本地环境中,我没有遇到这个问题。看起来spring框架和gae使用的缓存之间存在某种问题,但不知道这里发生了什么......请有什么建议吗?

它看起来也与前端实例有关,我想我在第一个请求之后总是有一个,但由于某种原因,有时会关闭,我必须再次更改为 F4 选项才能使其工作,否则我得到服务器错误。

从日志来看,objectify 可能会引发某种异常,我使用的是 4.0b2 版本

我还在该部分的应用引擎中发现了一个相关的错误:"ApiProxy$CancelledException: The API call memcache.Get() was explicitly cancelled."

https://code.google.com/p/googleappengine/issues/detail?id=7107

4

2 回答 2

4

您的应用似乎启动时间过长。你快到了 60 年代的最后期限。

您的应用在 F1 上启动所需的时间比在桌面上启动的时间要长 10 倍。在 prod 中,不仅服务器通过慢速网络加载类,而且 F1 实例的性能确实不足 - 你的手机有更多可用的 CPU。

您的应用程序即将迎来 60 年代的最后期限。当您切换到 F2/F4 实例时,额外的 CPU 能力会让您在最后期限之前启动您的应用程序。更改实例大小不会立即调整您的实例大小;它只影响启动的新实例。因此,当您改回 F1 时,最终 GAE 会启动一个新实例,而您又回到了相同的截止日期问题。

请注意,“处于边缘”总是很危险,因为 GAE 性能不稳定。方差可达3X;启动时间超过 20-25 秒是很危险的。

不幸的是,除了“优化你的启动”之外,没有什么神奇的解决方案。用探查器检查它。这将是不准确的,因为在本地运行不会给您提供与服务器端相同的行为(正如您所注意到的,您不会得到相同的减速),但这是一个开始。如果可以,请避免急切的类加载——尽管这对于 DI 框架来说很棘手。并确保避免在启动时从远程源(包括数据存储或内存缓存)进行任何数据预取。

您可以帮助缓解问题的一种方法(除了使用 F2 或 F4 实例)是创建一个每秒 ping 一次您的应用程序的 cron 作业。Cron 任务的最后期限是 10m 而不是 60s。至少,你会得到一个实例。

于 2013-09-08T14:29:40.703 回答
-1

那么我可以从你的堆栈跟踪中推断出,有一个进程正在你的 appengine 应用程序中运行,它调用任何其他进程或者可能是某个第三方进程,因此执行后一个进程的超时时间超过了,因此你得到了这个例外。

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL

**[jar:file:/base/data/home/apps/s~comprarebookhoy/1.370036978402952713/WEB-INF/lib/objectify-4.0b2.jar!/com/googlecode/objectify/repackaged/gentyref/CaptureType.class];**

nested exception is com.google.apphosting.api.DeadlineExceededException: 
This request (1de39e8e35c0b3f7) started at 2013/09/07 00:06:03.615 UTC and was still executing at 2013/09/07 00:07:03.073 UTC

Objectify Library、Spring 以及 Appengine没有任何问题。每当执行该特定进程时,正是代码内部的问题导致发生此异常。

还尝试在您的 appengine 仪表板中检查您的应用程序使用哪些 appengine 实例较高。您还可以在 appengine 仪表板本身中检查更多内容。

还要检查堆栈跟踪的最后几行。它清楚地解释了这个错误的原因。

I 2013-09-06 17:07:03.131
This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.
W 2013-09-06 17:07:03.131
A problem was encountered with the process that handled this request, causing it to exit. This is likely to cause a new process to be used for the next request to your application. If you see this message frequently, you may be throwing exceptions during the initialization of your application. (Error code 104)
于 2013-09-07T08:13:16.650 回答