Hi, for normal work of php-fpm + nginx + v8js you need to reset the $this->v8 property in the createContext method. Without this action, error 502 occurs constantly, and in the logs WARNING: [pool www] child 55 exited on signal 11 (SIGSEGV - core dumped)
public function createContext($code, $cachename = null) { if ($cachename) { $cacheItem = $this->cache->getItem($cachename); if ($cacheItem->isHit()) { $snapshot = $cacheItem->get(); } else { $snapshot = \V8Js::createSnapshot($code); $cacheItem->set($snapshot); $this->cache->save($cacheItem); } } else { $snapshot = \V8Js::createSnapshot($code); } $this->v8 = null; $this->v8 = new \V8Js('PHP', [], [], true, $snapshot); }
Hi, for normal work of php-fpm + nginx + v8js you need to reset the $this->v8 property in the createContext method. Without this action, error 502 occurs constantly, and in the logs WARNING: [pool www] child 55 exited on signal 11 (SIGSEGV - core dumped)
public function createContext($code, $cachename = null) { if ($cachename) { $cacheItem = $this->cache->getItem($cachename); if ($cacheItem->isHit()) { $snapshot = $cacheItem->get(); } else { $snapshot = \V8Js::createSnapshot($code); $cacheItem->set($snapshot); $this->cache->save($cacheItem); } } else { $snapshot = \V8Js::createSnapshot($code); } $this->v8 = null; $this->v8 = new \V8Js('PHP', [], [], true, $snapshot); }
https://github.com/phpv8/v8js/issues/138#issuecomment-96840065