duanlipeng4136 2018-07-05 16:14
浏览 873

PHP7.1 - 致命错误无法分配共享内存段

I cross-compiled PHP7.1 for ARMv7 and enabled OPCache extension.

In php.ini:

zend_extension=opcache.so
opcache.enable=0
opcache.memory_consumption=4
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=0

On target machine, whenever I try to run a PHP script I get:

Fatal Error Unable to allocate shared memory segment of 8388608 bytes

I made sure that system shared memory allocation is correctly configured:

ipcs -ml:
------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 131072
max total shared memory (kbytes) = 131072
min seg size (bytes) = 1

Disabling the OPCache makes the PHP scripts run as it should.

Any idea please?

  • 写回答

1条回答 默认 最新

  • 大炮V587 2021-04-01 21:01
    关注

    opcache 的内存设置太大了,设置小点试试

    评论

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型