G‘’day。
我有软呢帽21,HHVM版本3.7。我的问题是,我可以启动服务,我可以访问我的网页没有问题。但是,如果我始终刷新页面,HHVM就会崩溃,并且在检查状态时,它会返回以下错误:

HHVM错误日志返回:
Unable to open pid file /var/run/hhvm/pid for write现在我可以重新启动服务器,它可以正常工作,但是只有在处理完大量请求之后,它才会像上面那样崩溃。
PHP-FPM没有运行,除了HHVM之外,没有任何东西运行在端口9000上。
以下是一些配置信息
HHVM - server.ini
; php options
pid = /var/run/hhvm/pid
; hhvm specific
hhvm.server.port = 9000
hhvm.server.type = fastcgi
hhvm.server.source_root = /srv/www
hhvm.server.default_document = index.php
hhvm.log.level = Error
hhvm.log.use_log_file = true
hhvm.log.file = /var/log/hhvm/error.log
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbcHHVM -服务
[Unit]
Description=HipHop Virtual Machine (FCGI)
[Service]
ExecStart=/usr/bin/hhvm --config /etc/hhvm/server.ini --user hhvm --mode daemon -vServer.Type=fastcgi -vServer.Port=9000
PrivateTmp=true
[Install]
WantedBy=multi-user.targetNGINX站点文件
##NGINX STUFF
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index bootstrap.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
##MORE NGINX STUFF因此,从所提供的信息,是否有任何提示,可能是什么问题?
干杯伙计们。
发布于 2015-06-09 15:05:36
这是一个非常简单的权限问题,正如您的日志所提到的。您无法访问pid文件夹以生成pid文件。
sudo chmod -R 777 /var/run/hhvm我在Ubuntu上也有同样的问题。
在重新启动后,HHVM无法读取pid文件/var/run/hhvm/pid中任何有意义的pid
当您有很多请求时,另一个问题可能是最大值打开的文件限制。当您超过极限时,HHVM会崩溃。通常,您应该在日志中看到该错误,并且可以增加该限制。
https://serverfault.com/questions/679408/hhvm-exit-after-too-many-open-files
这是我在ServerFault上的问题。
https://stackoverflow.com/questions/30735654
复制相似问题