Config Litespeed with HHVM FastCGI

redstrike

Well-Known Member
#1
I tried to run LiteSpeed with HHVM via FastCGI. It works for a fews connections, later it's not stable, usually freeze and display 500 internal error / Request timeout.

After try a lot of ways of tuning external app settings, I wonder it's my mistake of configuring external app or HHVM itself.

hhvm lsws.jpg

Thank you in advance.
 

redstrike

Well-Known Member
#4
Persistent connection was turned off. But the same thing happened. DEBUG log didn't show anything useful.

In my surfing session, I see that it's slow down on pages which has INSERT operations to the MySQL database (I'm log a view count or search keyword). And after putting it's in production, it's quickly slow down and causes 503 errors no matter how many max_connections I set for external app.

I've tried latest prebuilt dev version of HHVM on gleez repo and stable 3.4.0 too. But it's no help.

If my config is not wrong, this might be the problem of HHVM via FastCGI with LiteSpeed. So, i will waiting for your implementation of LSAPI for HHVM. I hope you will have the benchmark between LSAPI PHP and LSAPI HHVM (hot warmed up for JIT), which will help LiteSpeed users easier to understand the pros & cons of each runtime.
 

redstrike

Well-Known Member
#5
I have found out the problems, all of them are belong to HHVM:

- I got connection refused and timeout, because of HHVM's default max_execution_time = 0, which is targeted to CLI app. And hhvm.server.request_timeout_seconds = 0
More info about these default settings: https://github.com/facebook/hhvm/issues/4209

- Affer that, I detected new problem which causes some of my pages hanging (so it's cannot serve a lot of concurent users). Memcache extension which bundled with HHVM has bugs that we couldn't get / set data. Memcached ext doesn't have that problem.
 

redstrike

Well-Known Member
#7
Updated: it seem not help, even after I reconfigured and change Memcache to Memcached. It runs fine on small workloads at night, but at the next morning, our production workloads was hanging again. I'm using hhvm-3.5.0-4 on CentOS 6.6_64 bit.

I decided to give up HHVM at this moment. Hope to see your LSAPI for HHVM in the future.
 

redstrike

Well-Known Member
#9
I installed HHVM in a Docker container which was running Ubuntu 12.x (it seems that HHVM doesn't support CentOS well).
nobody for LiteSpeed at host, root for HHVM.
HHVM is great, but I think it needs more time to be stable and compatible for GA release.
 

innovot

Well-Known Member
#10
Hello redstrike, how are you fairing with HHVM under LS ? Does LS have the option/ability to fail-back to standard PHP if the daemon is not available ?
 

redstrike

Well-Known Member
#11
Hello redstrike, how are you fairing with HHVM under LS ? Does LS have the option/ability to fail-back to standard PHP if the daemon is not available ?
My site's production code is not compatible with HHVM at that time, and it seems that HHVM add some noticeable latencies to my site's responses. Therefore, I've not cared about HHVM since last time. In my point of view, LSPHP is faster than HHVM when using with LiteSpeed. The last benchmarks of LiteSpeed team also had the same results. At this moment, I am waiting for PHP 7, I am betting in its new features, strict mode (static typed) and performance improvements.
 
Top