From a73aaeb7fd5f47698e0b0df8eb077b6ceb416bfb Mon Sep 17 00:00:00 2001 From: Michael O'Farrell Date: Fri, 7 Apr 2017 08:33:30 -0700 Subject: [PATCH] Enable IPv6 support. However siege continues to use IPv4 as it does not support IPv6. Also switched ini setting to hdf for legacy compatibility. --- base/HHVMDaemon.php | 2 +- base/Siege.php | 3 ++- conf/nginx/nginx.conf.in | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/base/HHVMDaemon.php b/base/HHVMDaemon.php index 169198d..f604256 100644 --- a/base/HHVMDaemon.php +++ b/base/HHVMDaemon.php @@ -124,7 +124,7 @@ protected function getArguments(): Vector { if (count($this->options->hhvmExtraArguments) > 0) { $args->addAll($this->options->hhvmExtraArguments); } - $args->add('-dhhvm.server.thread_count='.$this->options->serverThreads); + $args->add('-vServer.ThreadCount='.$this->options->serverThreads); if ($this->options->precompile) { $bcRepo = $this->options->tempDir.'/hhvm.hhbc'; $args->add('-v'); diff --git a/base/Siege.php b/base/Siege.php index 924226a..4e725e1 100644 --- a/base/Siege.php +++ b/base/Siege.php @@ -92,7 +92,8 @@ protected function getArguments(): Vector { $urls = file_get_contents($this->target->getURLsFile()); $urls = str_replace('__HTTP_PORT__', (string) PerfSettings::HttpPort(), $urls); - $urls = str_replace('__HTTP_HOST__', gethostname(), $urls); + // Siege doesn't support ipv6 + $urls = str_replace('__HTTP_HOST__', '127.0.0.1', $urls); file_put_contents($urls_file, $urls); $arguments = Vector {}; diff --git a/conf/nginx/nginx.conf.in b/conf/nginx/nginx.conf.in index accd1e1..bef47ca 100644 --- a/conf/nginx/nginx.conf.in +++ b/conf/nginx/nginx.conf.in @@ -34,6 +34,7 @@ http { #gzip on; server { + listen [::]:__HTTP_PORT__ default_server; listen __HTTP_PORT__ default_server; access_log __NGINX_TEMP_DIR__/access.log main; client_body_temp_path __NGINX_TEMP_DIR__/client_temp; @@ -80,6 +81,7 @@ http { } server { + listen [::]:__HTTP_ADMIN_PORT__ default_server; listen __HTTP_ADMIN_PORT__ default_server; access_log __NGINX_TEMP_DIR__/admin-access.log main; client_body_temp_path __NGINX_TEMP_DIR__/admin-client_temp;