- PHP Version 7.0.4-7+deb.sury.org~trusty+2
- phalcon
- Version 2.1.0r
- Powered by Zephir Version 0.9.2a-dev
- nginx + php-fpm
simple script:
$config = array(
"host" => "localhost",
"dbname" => "testbase",
"port" => 3306,
"username" => "testbase",
"password" => "testbase"
);
use Phalcon\Di\FactoryDefault;
$di = new FactoryDefault();
$di->set('db', function() use ($config) {
return new \Phalcon\Db\Adapter\Pdo\Mysql([
"host" => $config['host'],
"username" => $config['username'],
"password" => $config['password'],
"dbname" => $config['dbname']
]);
});
$m = TestModel::findFirst();
I see '502 Bad Gateway' error page and nginx log '*956 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 127.0.0.1'