Google App Engine - schedulerError - PullRequest
       1

Google App Engine - schedulerError

0 голосов
/ 27 апреля 2018

Ниже приведена ошибка, с которой мое приложение сгенерировало, а затем запустило серию StackOverflowError, вопрос был бы: если тайм-ауты TaskQueue много, это вызовет StackOverflowError?

[INFO] SEVERE: Job somepath-fast.task-345bddcf-a8f1-471f-8974-e285746e9c78 threw an unhandled Exception: 
[INFO] com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 5: http method POST against URL http://127.0.0.1:8080/somepath timed out.
[INFO]  at com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch(LocalURLFetchService.java:407)
[INFO]  at com.google.appengine.api.taskqueue.dev.LocalTaskQueue$UrlFetchServiceLocalTaskQueueCallback.execute(LocalTaskQueue.java:701)
[INFO]  at com.google.appengine.api.taskqueue.dev.UrlFetchJob.execute(UrlFetchJob.java:90)
[INFO]  at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
[INFO]  at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
[INFO] 
[INFO] Apr 27, 2018 10:06:25 AM org.quartz.core.ErrorLogger schedulerError
[INFO] SEVERE: Job (somepath-fast.task-345bddcf-a8f1-471f-8974-e285746e9c78 threw an exception.
[INFO] org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 5: http method POST against URL http://127.0.0.1:8080/somepath timed out.]
[INFO]  at org.quartz.core.JobRunShell.run(JobRunShell.java:214)
[INFO]  at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
[INFO] * Nested Exception (Underlying Cause) ---------------
[INFO] com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 5: http method POST against URL http://127.0.0.1:8080/somepath timed out.
[INFO]  at com.google.appengine.api.urlfetch.dev.LocalURLFetchService.fetch(LocalURLFetchService.java:407)
[INFO]  at com.google.appengine.api.taskqueue.dev.LocalTaskQueue$UrlFetchServiceLocalTaskQueueCallback.execute(LocalTaskQueue.java:701)
[INFO]  at com.google.appengine.api.taskqueue.dev.UrlFetchJob.execute(UrlFetchJob.java:90)
[INFO]  at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
[INFO]  at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)

1 Ответ

0 голосов
/ 28 апреля 2018

Так что да, после обмена комментариями проблема звучит знакомо. Если это та же проблема, я смог это исправить, выполнив следующие действия:

Обычная задача задается примерно так (не работает в dev):

Queue myQueue = QueueFactory.getDefaultQueue();
SendDailyQuote myTask = new SendDailyQuote();
myQueue.add(TaskOptions.Builder.withPayload(myTask));

В среде разработки:

//Queue myQueue = QueueFactory.getDefaultQueue();
SendDailyQuote myTask = new SendDailyQuote();
//myQueue.add(TaskOptions.Builder.withPayload(myTask));
myTask.run();
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...