exec 命令上允许的内存耗尽不会导致异常
我使用exec
在Laravel PHP中解开大块的ZIP文件。在某些情况下,以过多的内存使用形式发生错误: 允许的内存大小为2097152字节耗尽的< / code>
我的问题是我在系统日志 /工匠控制台中获取此消息,而不是在PHP中获得此消息。在php中,我的代码只是在exec
行之后不会继续执行,但不会引起任何错误/异常,这使我无法对通知用户或重试(或至少删除删除)做出反应现在毫无用处的块)。
发生此问题时,是否可以知道PHP内部?
I am unzipping large chunked zip file using exec
in Laravel PHP. With certain situations, an error occurs in the form of an excessive memory usage:Allowed memory size of 2097152 byte s exhausted
My problem is that I get this message in the system log / artisan console, but not in the PHP. Inside the PHP my code just won't continue executing after the exec
line, but it does not cause any error/exception, which prevents me to react informing the user or retrying (or, at least, deleting the now useless chunks).
Is it possible to know inside PHP when this problem is occurring?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论