gpt4 book ai didi

java - 关闭Google云平台Executorservice错误

转载 作者:行者123 更新时间:2023-12-01 17:22:48 25 4
gpt4 key购买 nike

我有一个 Spring boot 应用程序,我在其中上传多个文件,提交后,它将所有文件转换为 byte[] 并将这些文件附加到电子邮件中。它在本地运行良好。当我上传超过5MB的文件时,但上传到Google Cloud Platform后无法正常工作。

以下是我收到的错误。

2020-04-17 02:07:13 default[20200416t214835]  {"severity": "WARNING", "message": "App is listening on port 8080. We recommend your app listen on the port defined by the PORT environment variable to take advantage of an NGINX layer on port 8080."}\njava.lang.NullPointerException
2020-04-17 02:07:13 default[20200416t214835] at taxtown.taxfile.controller.TaxRestController.getFormData(TaxRestController.java:238)
2020-04-17 02:07:13 default[20200416t214835] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2020-04-17 02:07:13 default[20200416t214835] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2020-04-17 02:07:13 default[20200416t214835] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2020-04-17 02:07:13 default[20200416t214835] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
2020-04-17 02:07:13 default[20200416t214835] at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
2020-04-17 02:07:13 default[20200416t214835] at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
2020-04-17 02:07:13 default[20200416t214835] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
2020-04-17 02:07:13 default[20200416t214835] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2020-04-17 02:07:13 default[20200416t214835] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2020-04-17 02:07:13 default[20200416t214835] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
2020-04-17 02:07:13 default[20200416t214835] at java.base/java.lang.Thread.run(Thread.java:834)
2020-04-17 02:07:13 default[20200416t214835] --------------Excepiton is----------null
2020-04-17 02:07:21 default[20200416t214835] 2020-04-17 02:07:21.593 INFO 10 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-04-17 02:07:21 default[20200416t214835] 2020-04-17 02:07:21.594 INFO 11 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-04-17 02:07:21 default[20200416t214835] 2020-04-17 02:07:21.594 INFO 11 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-04-17 02:07:21 default[20200416t214835] 2020-04-17 02:07:21.641 INFO 10 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-04-17 02:07:22 default[20200416t214835] {"severity": "WARNING", "message": "App is listening on port 8080. We recommend your app listen on the port defined by the PORT environment variable to take advantage of an NGINX layer on port 8080."}\n
2020-04-17 02:07:22 default[20200416t214835] {"severity": "WARNING", "message": "App is listening on port 8080. We recommend your app listen on the port defined by the PORT environment variable to take advantage of an NGINX layer on port 8080."}\n
2020-04-17 02:07:22 default[20200416t214835] {"severity": "WARNING", "message": "App is listening on port 8080. We recommend your app listen on the port defined by the PORT environment variable to take advantage of an NGINX layer on port 8080."}\n
2020-04-17 02:07:22 default[20200416t214835] {"severity": "WARNING", "message": "App is listening on port 8080. We recommend your app listen on the port defined by the PORT environment variable to take advantage of an NGINX layer on port 8080."}\n

感谢任何帮助。

最佳答案

该问题是由于内存错误造成的。它未显示在 gcloud 日志控制台中。但我在 GCP 日志中看到了这一点。

下面是错误。

Exceeded soft memory limit of 256 MB with 322 MB after servicing 3 requests total. Consider setting a larger instance class in app.yaml

关于java - 关闭Google云平台Executorservice错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61263106/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com