Upgraded from PHP 5.3 to PHP 5.4 and now, all Phalcon sites on the server give a 502 error.
Box info: Centos 6.5 PHP 5.4 nginx 1.6 Phalcon 2.0
The error messages: Browser shows:
502 Bad Gateway
Nginx Log:
[error] 27662#0: *6 recv() failed (104: Connection reset by peer) while reading response header from upstream
PHP-FPM log:
WARNING: [pool www] child 27667 exited on signal 4 (SIGILL) after 272.690790 seconds from start
nginx and php-fpm have been restarted numerous times. Phalcon has be reinstalled numerous times.
PHP-FPM Conf:
include=/etc/php-fpm.d/*.conf
pid = /var/run/php-fpm/php-fpm.pid
PHP-FPM www.conf
listen = /var/run/php5-fpm.sock
listen.owner = nginx
listen.group = nginx
user = nginx;
group = nginx;
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.max_requests = 500
security.limit_extensions = false
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/session
the session path has already been checked for permissions and ownership, so that is fine.
Nginx Conf:
server {
listen IPADDR:80;
server_name sub.domain.com;
index index.php index.html index.htm;
set $root_path '/var/www/projectname/public';
root $root_path;
location / {
try_files $uri $uri/ @php_mvc;
}
location @php_mvc {
rewrite ^(.+)$ /index.php$1 last;
}
location ~ ^(.+\.php)(/.*)?$ {
fastcgi_split_path_info ^(.+\.php)(/.*)?$;
set $script_filename $document_root$fastcgi_script_name;
if (!-e $script_filename) {
return 404;
}
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param APPLICATION_ENV development;
fastcgi_param SCRIPT_FILENAME $script_filename;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~* ^/(css|img|js|flv|swf|download|images)/(.+)$ {
root $root_path;
}
}
Any help is greatly appreciated!
答案 0 :(得分:1)
好的,我终于在Phalcon的github问题列表中找到了答案。
这篇文章: Phalcon Github issue 2593
解决方案是删除我的所有phalcon代码,然后通过以下方式手动重新编译:
// Add Identity services to the services container.
services.AddIdentity<ApplicationUser, IdentityRole>(options => {
options.User.RequireUniqueEmail = false; })
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
我还git克隆了该来源的新版本以确保。删除以前的代码对我来说更确保它没有抓取任何缓存配置。希望这有助于其他人节省几个小时!