在Laravel中启用GAE选项“ enable_stackdriver_integration”时出错

时间:2019-09-12 07:50:45

标签: laravel google-app-engine stackdriver

当我通过Laravel框架在Google App Engine(Flexible PHP)上使用选项“ enable_stackdriver_integration:true”时,将日志(和错误日志)发送到Google Stackdriver,就可以了。

但是,当我尝试从php docker容器运行一个PHP命令行(例如:php artisan migration)进入应用引擎的实例时,出现以下错误:

PHP Warning:  sem_get(): failed for key 0x41019ecd: Permission denied in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 71
PHP Warning:  sem_acquire() expects parameter 1 to be resource, boolean given in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 81
PHP Warning:  shm_attach(): failed for key 0x41019ecd: Permission denied in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 130
PHP Warning:  shm_attach(): failed for key 0x41019ecd: Permission denied in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 156
PHP Warning:  shm_remove_var() expects parameter 1 to be resource, boolean given in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 157
PHP Warning:  sem_release() expects parameter 1 to be resource, boolean given in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 91
PHP Fatal error:  Uncaught RuntimeException: Failed to attach to the shared memory in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php:132
Stack trace:
#0 /app/vendor/google/cloud-core/src/Batch/BatchRunner.php(191): Google\Cloud\Core\Batch\SysvConfigStorage->load()
#1 /app/vendor/google/cloud-core/src/Batch/BatchRunner.php(74): Google\Cloud\Core\Batch\BatchRunner->loadConfig()
#2 /app/vendor/google/cloud-core/src/Batch/BatchTrait.php(201): Google\Cloud\Core\Batch\BatchRunner->__construct()
#3 /app/vendor/google/cloud-logging/src/PsrLogger.php(150): Google\Cloud\Logging\PsrLogger->setCommonBatchProperties(Array)
#4 /app/vendor/google/cloud-logging/src/LoggingClient.php(575): Google\Cloud\Logging\PsrLogger->__construct(Object(Google\Cloud\Logging\Logger), NULL, Array)
#5 /app/vendor/google/cloud-error-reporting/src/Bootstrap.php(40): Google\Cloud\Logging\LoggingClient->psrLogger('app-error', Array)
#6 /app/vendor/google/cloud-error-reporting/src/prepend.php(68): Google\Cloud\ErrorReporting\Bootstrap::init(NULL)
#7  in /app/vendor/google/cloud-core/src/Batch/SysvConfigStorage.php on line 132

当然,如果我从app.yaml中删除该选项,则没有问题。你知道为什么吗?

0 个答案:

没有答案