Reputation: 51
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!
Upvotes: 1
Views: 620
Reputation: 51
Ok, I finally found answer in Phalcon's github issue list.
This post: Phalcon Github issue 2593
The solution was to remove all my phalcon code, and then recompile it by hand via:
cd build/64bits
phpize
export CFLAGS="-O2 -g"
./configure
make
sudo make install
I also git cloned a fresh version of that source to make sure. The removing of the previous code was more for me to make sure it didn't grab any cached configuration. Hopefully this helps someone else save several hours!
Upvotes: 1