开发者社区> 问答> 正文

MNS消息服务在函数计算运行时好时坏

如PHP代码片段
$request = new RequestQueue(MNS_ACCESSID, MNS_ACCESSKEY, MNS_ENDPOINT);
在函数计算那边运行一次正常,第二次运行报错,这样一直循环对错。看起来像是创建的 $request对象没有释放,但php代码又是执行就释放的脚本,不应该啊,当我修改$request为其他名字运行又没报错。
/var/fc/runtime/php7.2/builtIn/http/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:123
5.3135 4069728 12. React\Socket\Connection->emit() /var/fc/runtime/php7.2/builtIn/http/src/StreamingServer.php:179
5.3135 4069728 13. React\Http\Io\CloseProtectionStream->handleData() /var/fc/runtime/php7.2/builtIn/http/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:123
5.3135 4070104 14. React\Http\Io\CloseProtectionStream->emit() /var/fc/runtime/php7.2/builtIn/http/src/Io/CloseProtectionStream.php:96
5.3135 4070104 15. React\Http\Io\LengthLimitedStream->handleData() /var/fc/runtime/php7.2/builtIn/http/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:123
5.3136 4071128 16. React\Http\Io\LengthLimitedStream->emit() /var/fc/runtime/php7.2/builtIn/http/src/Io/LengthLimitedStream.php:87
5.3136 4071128 17. React\Http\Io\HttpBodyStream->handleEnd() /var/fc/runtime/php7.2/builtIn/http/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:123
5.3136 4071128 18. React\Http\Io\HttpBodyStream->close() /var/fc/runtime/php7.2/builtIn/http/src/Io/HttpBodyStream.php:179
5.3136 4063984 19. React\Http\Io\HttpBodyStream->emit() /var/fc/runtime/php7.2/builtIn/http/src/Io/HttpBodyStream.php:80
5.3136 4063984 20. React\Promise\Stream\{closure}() /var/fc/runtime/php7.2/builtIn/http/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php:123
5.3136 4063984 21. React\Promise\Promise::React\Promise\{closure}() /var/fc/runtime/php7.2/builtIn/http/vendor/react/promise-stream/src/functions.php:43
5.3136 4064040 22. React\Promise\Promise->settle() /var/fc/runtime/php7.2/builtIn/http/vendor/react/promise/src/Promise.php:231
5.3136 4063344 23. React\Promise\Promise::React\Promise\{closure}() /var/fc/runtime/php7.2/builtIn/http/vendor/react/promise/src/Promise.php:168
5.3136 4063344 24. React\Promise\FulfilledPromise->done() /var/fc/runtime/php7.2/builtIn/http/vendor/react/promise/src/Promise.php:135
5.3136 4063344 25. React\Promise\Promise::React\Promise\{closure}() /var/fc/runtime/php7.2/builtIn/http/vendor/react/promise/src/FulfilledPromise.php:39
5.3136 4063400 26. React\Promise\Promise->settle() /var/fc/runtime/php7.2/builtIn/http/vendor/react/promise/src/Promise.php:231
5.3136 4062304 27. React\Promise\Promise::React\Promise\{closure}() /var/fc/runtime/php7.2/builtIn/http/vendor/react/promise/src/Promise.php:168
5.3136 4062304 28. React\Promise\FulfilledPromise->then() /var/fc/runtime/php7.2/builtIn/http/vendor/react/promise/src/Promise.php:134
5.3136 4062304 29. React\Http\Middleware\RequestBodyBufferMiddleware->React\Http\Middleware\{closure}() /var/fc/runtime/php7.2/builtIn/http/vendor/react/promise/src/FulfilledPromise.php:25
5.3137 4063664 30. React\Http\Io\MiddlewareRunner->React\Http\Io\{closure}() /var/fc/runtime/php7.2/builtIn/http/src/Middleware/RequestBodyBufferMiddleware.php:58
5.3137 4063664 31. React\Http\Io\MiddlewareRunner->call() /var/fc/runtime/php7.2/builtIn/http/src/Io/MiddlewareRunner.php:54
5.3137 4064360 32. React\Http\Middleware\RequestBodyParserMiddleware->__invoke() /var/fc/runtime/php7.2/builtIn/http/src/Io/MiddlewareRunner.php:59
5.3137 4064360 33. React\Http\Io\MiddlewareRunner->React\Http\Io\{closure}() /var/fc/runtime/php7.2/builtIn/http/src/Middleware/RequestBodyParserMiddleware.php:34
5.3137 4064360 34. React\Http\Io\MiddlewareRunner->call() /var/fc/runtime/php7.2/builtIn/http/src/Io/MiddlewareRunner.php:54
5.3137 4064360 35. ServerlessFC\{closure}() /var/fc/runtime/php7.2/builtIn/http/src/Io/MiddlewareRunner.php:49
5.3140 4069016 36. ServerlessFC\NormalCARequest->invoke() /var/fc/runtime/php7.2/src/server.php:76

展开
收起
1037138191069812 2018-11-01 22:38:50 1305 0
1 条回答
写回答
取消 提交回答
  • 您好,我这里看您的PHP版本可能为7.2,建议您尝试使用PHP5.6版本执行,可能是由于版本不兼容的原因,或者您也可以查看配置是否有误。如果您对我的回答满意,请您采纳一下,谢谢!
    2018-11-01 22:42:36
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Hologres Serverless之路:揭秘弹性计算组 立即下载
Serverless开发平台: 让研发效能再提升 立即下载
Serverless 引领云上研发新范式 立即下载