![eAccelerator 启动时 Varnish 缓存出现 503 错误](https://linux22.com/image/599167/eAccelerator%20%E5%90%AF%E5%8A%A8%E6%97%B6%20Varnish%20%E7%BC%93%E5%AD%98%E5%87%BA%E7%8E%B0%20503%20%E9%94%99%E8%AF%AF.png)
我在超大型 Amazon 服务器上运行 Magento 安装。我在服务器上安装了 Varnish、memcached 和 eAccelerator。起初一切都运行良好,但后来某个时候它停止工作,抛出 503 错误,下面有 Varnish 缓存标记。当我禁用 eaccelerator 时,错误消失,网站正常运行。这是我的 eaccelerator 配置:
extension="eaccelerator.so"
eaccelerator.shm_size = "512"
eaccelerator.cache_dir = "/var/cache/php-eaccelerator"
eaccelerator.enable = "1"
eaccelerator.optimizer = "1"
eaccelerator.debug = 0
eaccelerator.log_file = "/var/log/httpd/eaccelerator_log"
eaccelerator.name_space = ""
eaccelerator.check_mtime = "1"
eaccelerator.filter = ""
eaccelerator.shm_ttl = "0"
eaccelerator.shm_prune_period = "0"
eaccelerator.shm_only = "0"
eaccelerator.allowed_admin_path = ""
有什么提示吗?
答案1
问题是由于内核只允许 32M 的共享内存(如 中所定义)/proc/sys/kernel/shmmax
而我试图分配 512M。