从今天早上开始,我一直在日志中收到所有taskqueue调用的错误消息。消息是“处理此请求的进程遇到问题,导致它退出。这可能导致新进程用于下一个应用程序请求。(错误代码204)”。我有一段时间没有更新应用程序,它曾经工作正常。有人可以指出这个错误意味着什么。
由于
的app.yaml
application: appid
version: 1-05
runtime: php
api_version: 1
threadsafe: true
- url: /worker.php
script: tasks/worker.php
login: admin
- url: /new_req
script: tasks/Fetch/requestAmazonOrders.php
login: admin
cron.yaml
cron:
- description: new xml orders file requests
url: /new_req
schedule: every 7 hours from 04:55 to 19:30
timezone: Europe/London
requestAmazonOrders.php
use google\appengine\api\taskqueue\PushTask;
try {
$dt = new DateTime();
$dt_now = new DateTime();
$times = array(
'a-start' => $dt->sub(new DateInterval('P90D'))->format('Y-m-d\TH:i:s'),
'a-end' => $dt->add(new DateInterval('P30D'))->format('Y-m-d\TH:i:s'),
'b-start' => $dt->add(new DateInterval('P0DT30S'))->format('Y-m-d\TH:i:s'),
'b-end' => $dt->add(new DateInterval('P30D'))->format('Y-m-d\TH:i:s'),
'c-start' => $dt->add(new DateInterval('P0DT30S'))->format('Y-m-d\TH:i:s'),
'c-end' => $dt_now->sub(new DateInterval('P0DT2M'))->format('Y-m-d\TH:i:s')
);
foreach (array('a', 'b', 'c') as $stage) {
$params = array(
'action' => 'NewReportRequest',
'stage' => $stage,
'times' => $times
);
$task = new PushTask('/worker.php', $params);
$task_name = $task->add('Secondary');
syslog(LOG_INFO, "NewReportRequest(FlatFile): stage: $stage. $task_name");
}
return;
} catch (Exception $ex) {
syslog(LOG_ERR, $ex->getLine() . PHP_EOL . $ex->getFile() . PHP_EOL . $ex->getMessage() . PHP_EOL . $ex->getTraceAsString());
return;
}