简体   繁体   English

如何调试hhvm服务器

[英]how to debug an hhvm server

I have wordpress running in a hiphop vm on ubuntu 12.04. 我在Ubuntu 12.04的hiphop vm中运行了wordpress。 My server works fine for about an hour and then it stops serving requests and just times out. 我的服务器可以正常工作约一个小时,然后停止服务请求,并且超时。 I can see that the hhvm process is still running when I execute ps -aux | grep "hhvm" 我可以看到当执行ps -aux | grep "hhvm"时hhvm进程仍在运行ps -aux | grep "hhvm" ps -aux | grep "hhvm" but it is just not responding to any requests. ps -aux | grep "hhvm"但它只是不响应任何请求。 Is there anyway that I can debug this? 无论如何,我可以调试吗? No errors are appearing in my log file so I have no Idea where to go from here. 我的日志文件中没有出现错误,所以我不知道从这里去哪里。 Is there any way to debug your php code while running in hhvm? 在hhvm中运行时,有什么方法可以调试您的php代码?

UPDATE: 更新:

I uped the threads from 50 to 300 and the server lasted 24 hours and now the same thing is occurring again. 我将线程从50个增加到300个,服务器持续了24小时,现在又发生了同样的事情。

output from the admin page /check-health is 管理页面/ check-health的输出是

{
  "load":240
,  "queued":0
,  "hhbc-roarena-capac":0
,  "tc-size":17473376
,  "tc-stubsize":12588591
,  "targetcache":37280
,  "units":223
}

and /stats.html is /stats.html是

{
  "stats": {
    "pages": [
    ]
  }
}

It sounds like there might be a bug in the version of HHVM that you are using where the threads gradually hang over time until there are no more worker threads available to serve incoming requests. 听起来好像您正在使用的HHVM版本中存在一个错误,即随着时间的推移线程逐渐挂起,直到没有更多的工作线程可用于处理传入的请求。

You can collect some details by attaching to the process with gdb (by typing "gdb -p $PID" where $PID is hhvm's process ID) and then typing "thread apply all bt" to get the stack traces of all the threads. 您可以通过使用gdb附加到进程中来收集一些详细信息(键入“ gdb -p $ PID”,其中$ PID是hhvm的进程ID),然后键入“ thread apply all bt”以获取所有线程的堆栈跟踪。 If you open a github issue at https://github.com/facebook/hiphop-php/issues and provide the stack traces of all the threads someone from the HHVM team should respond and help dig into the issue. 如果您在https://github.com/facebook/hiphop-php/issues中打开github问题,并提供所有线程的堆栈跟踪,那么HHVM团队的人应该做出回应并帮助深入研究问题。 The more details you provide on how to reproduce the issue (ex. giving a small, complete code example that reproduces the problem), the more likely it will be that the bug can be identified and fixed. 您提供的有关如何重现该问题的详细信息越多(例如,提供一个完整的小代码示例来重现该问题),则越有可能可以识别并修复该错误。

Also, if you using are an older version of HHVM you might try upgrading to a newer version, since there have been a number of bug fixes over the past few months. 另外,如果您使用的是HHVM的旧版本,则可以尝试升级到新版本,因为在过去的几个月中已修复了许多错误。 I don't know off hand if there were any bug fixes for threads getting stuck, but it's possible upgrading might fix your issue. 我不知道是否有任何针对线程卡住的错误修复程序,但是升级可能会解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM