Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx error log : recv() failed (104: Connection reset by peer) #12160

Closed
yeoman-chen opened this issue Aug 23, 2016 · 17 comments
Closed

Nginx error log : recv() failed (104: Connection reset by peer) #12160

yeoman-chen opened this issue Aug 23, 2016 · 17 comments
Labels
stale Stale issue - automatically closed

Comments

@yeoman-chen
Copy link

When accessing http://xxx.xxxxx.com/admin/selectroom/configlist, Nginx error:
[error] 23927#0: *1380793 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.10.239, server: http://xxx.xxxxx.com, request: "GET /admin/selectroom/configlist HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "http://xxx.xxxxx.com"

namespace MyApp\Controllers\Admin;
use MyApp\Controllers\Admin\BaseController;
class SelectroomController extends BaseController
{
       public function configListAction()
       {

       }
}

Details

  • Phalcon version: 3.0.0
  • PHP Version: 7.0.0
  • Operating System:Linux 8.4
  • Zephir version (if any):
  • Server: Nginx
@Jurigag
Copy link
Contributor

Jurigag commented Aug 23, 2016

This means that your fastcgi ended unexpectedly. Check php-fpm(or whatever other handler you are using) logs. It's possible that you have core dump. Then try to use this to generace backtrace:

https://github.com/phalcon/cphalcon/wiki/Generating-a-backtrace

@yeoman-chen
Copy link
Author

[23-Aug-2016 16:57:10] WARNING: [pool www] child 1933 exited on signal 11 (SIGSEGV) after 221.151060 seconds from start
[23-Aug-2016 16:57:10] NOTICE: [pool www] child 8687 started

@Jurigag
Copy link
Contributor

Jurigag commented Aug 23, 2016

This means segfault, read what i wrote above. Provide backtrace from gdb.

@stamster
Copy link
Contributor

With Phalcon 2.0.x and PHP 5.x this issue was also present, but only during high load.

@Jurigag
Copy link
Contributor

Jurigag commented Aug 23, 2016

Guys, please post backtrace, we don't anything how to reproduce this issue, you just posted some code of controller, i have controller and action too and it works for me.

I NEVER had such an issue on php 5.x and phalcon 2.0.x, php5-fpm uptime is like xxx hours.

@kcloze
Copy link

kcloze commented Aug 23, 2016

Reading symbols from /usr/lib/libfdfsclient.so...done.
Loaded symbols for /usr/lib/libfdfsclient.so
Reading symbols from /usr/lib/libfastcommon.so...done.
Loaded symbols for /usr/lib/libfastcommon.so
Reading symbols from /opt/php7/lib/php/extensions/no-debug-non-zts-20151012/oneapm.so...done.
Loaded symbols for /opt/php7/lib/php/extensions/no-debug-non-zts-20151012/oneapm.so
Reading symbols from /opt/php7/lib/php/extensions/no-debug-non-zts-20151012/networkbench.so...done.
Loaded symbols for /opt/php7/lib/php/extensions/no-debug-non-zts-20151012/networkbench.so
Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libnss_files.so.2
Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgcc_s.so.1
Core was generated by `php-fpm: pool www                                                             '.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f3c82764272 in xdebug_build_fname (zdata=0x7f3c89415660, op_array=0x7f3c894810e0, type=<value optimized out>) at /data/src/xdebug/xdebug_stack.c:1150
1150            } else if (edata && edata->prev_execute_data && edata->prev_execute_data->opline && edata->prev_execute_data->opline->opcode == ZEND_INCLUDE_OR_EVAL) {
Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.23-15.el6.x86_64 freetype-2.3.11-15.el6_6.1.x86_64 glibc-2.12-1.149.el6.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-37.el6_6.x86_64 libcom_err-1.41.12-21.el6.x86_64 libcurl-7.19.7-40.el6_6.4.x86_64 libgcc-4.4.7-11.el6.x86_64 libidn-1.18-2.el6.x86_64 libjpeg-turbo-1.2.1-3.el6_5.x86_64 libpng-1.2.49-1.el6_2.x86_64 libselinux-2.0.94-5.8.el6.x86_64 libssh2-1.4.2-1.el6.x86_64 libxml2-2.7.6-17.el6_6.1.x86_64 nspr-4.10.6-1.el6_5.x86_64 nss-3.16.1-14.el6.x86_64 nss-softokn-freebl-3.14.3-17.el6.x86_64 nss-util-3.16.1-3.el6.x86_64 openldap-2.4.39-8.el6.x86_64 openssl-1.0.1e-30.el6.11.x86_64 zlib-1.2.3-29.el6.x86_64

@kcloze
Copy link

kcloze commented Aug 23, 2016

24 0x00007f3c821fc881 in zephir_return_call_class_method (execute_data=<value optimized out>, return_value=0x7f3c89415400) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:2944
#25 zim_Phalcon_Mvc_View_Engine_partial (execute_data=<value optimized out>, return_value=0x7f3c89415400) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:2776
#26 0x00007f3c811d2521 in nb_execute_internal (execute_data=0x7f3c89415440, return_value=0x7f3c89415400) at /tingyun/nbprof/nbprof.c:381
#27 0x00007f3c8275183f in xdebug_execute_internal (current_execute_data=0x7f3c89415440, return_value=0x7f3c89415400) at /data/src/xdebug/xdebug.c:2012
#28 0x000000000087f722 in ZEND_DO_FCALL_SPEC_HANDLER (execute_data=0x7f3c89415330) at /data/src/php-7.0.0/Zend/zend_vm_execute.h:844
#29 0x0000000000847e70 in execute_ex (ex=<value optimized out>) at /data/src/php-7.0.0/Zend/zend_vm_execute.h:417
#30 0x00007f3c814084c0 in new_execute_ex (execute_data=0x7f3c89415330) at /PHP/64/source/php7.0.0_nzts/ext/apm/apm.c:736
#31 0x00007f3c811d263e in nb_execute_ex (execute_data=0x7f3c89415330) at /tingyun/nbprof/nbprof.c:305
#32 0x00007f3c82751ef7 in xdebug_execute_ex (execute_data=0x7f3c89415330) at /data/src/xdebug/xdebug.c:1867
#33 0x000000000089a69b in zend_execute (op_array=0x7f3c894817e0, return_value=<value optimized out>) at /data/src/php-7.0.0/Zend/zend_vm_execute.h:458
#34 0x00007f3c81f8ff1a in zephir_require_ret (return_value_ptr=0x0, require_path=0x7f3c894ca1d8 "/opt/nginx/html/ycf_direct_selling/app/views/admin/selectroom/configlist.phtml")
    at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:9812
#35 0x00007f3c82117171 in zephir_require_zval (execute_data=<value optimized out>, return_value=0x7fffe8bb36b0) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:3023
#36 zim_Phalcon_Mvc_View_Engine_Php_render (execute_data=<value optimized out>, return_value=0x7fffe8bb36b0) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:3859
#37 0x00007f3c811d2521 in nb_execute_internal (execute_data=0x7f3c894152a0, return_value=0x7fffe8bb36b0) at /tingyun/nbprof/nbprof.c:381
#38 0x00007f3c8275183f in xdebug_execute_internal (current_execute_data=0x7f3c894152a0, return_value=0x7fffe8bb36b0) at /data/src/xdebug/xdebug.c:2012
#39 0x00007f3c81f9eb08 in zephir_call_function_opt (fci=0x7fffe8bb3550, fci_cache=0x7fffe8bb35a0, info=<value optimized out>, params=<value optimized out>)
    at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:7718
#40 0x00007f3c81f9f109 in zephir_call_user_function (object_pp=<value optimized out>, obj_ce=<value optimized out>, type=<value optimized out>, function_name=<value optimized out>, 
    retval_ptr=0x7fffe8bb36b0, cache_entry=0x0, cache_slot=0, param_count=3, params=0x7fffe8bb37a0, info=0x7fffe8bb3670) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:9409
#41 0x00007f3c81f9f6a7 in zephir_call_class_method_aparams (return_value_ptr=0x0, ce=0x15cf220, type=zephir_fcall_method, object=<value optimized out>, method_name=0x7f3c82247896 "render", 
    method_len=<value optimized out>, cache_entry=0x0, cache_slot=0, param_count=3, params=0x7fffe8bb37a0) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:9610
#42 0x00007f3c82155ee9 in zim_Phalcon_Mvc_View__engineRender (execute_data=<value optimized out>, return_value=0x7fffe8bb3e30) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:95138
---Type <return> to continue, or q <return> to quit---
#43 0x00007f3c811d2521 in nb_execute_internal (execute_data=0x7f3c894151f0, return_value=0x7fffe8bb3e30) at /tingyun/nbprof/nbprof.c:381
#44 0x00007f3c8275183f in xdebug_execute_internal (current_execute_data=0x7f3c894151f0, return_value=0x7fffe8bb3e30) at /data/src/xdebug/xdebug.c:2012
#45 0x00007f3c81f9eb08 in zephir_call_function_opt (fci=0x7fffe8bb3cd0, fci_cache=0x7fffe8bb3d20, info=<value optimized out>, params=<value optimized out>)
    at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:7718
#46 0x00007f3c81f9f109 in zephir_call_user_function (object_pp=<value optimized out>, obj_ce=<value optimized out>, type=<value optimized out>, function_name=<value optimized out>, 
    retval_ptr=0x7fffe8bb3e30, cache_entry=0x7fffe8bb4220, cache_slot=0, param_count=5, params=0x7fffe8bb3ee0, info=0x7fffe8bb3df0) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:9409
#47 0x00007f3c81f9f6a7 in zephir_call_class_method_aparams (return_value_ptr=0x0, ce=0x15cad00, type=zephir_fcall_method, object=<value optimized out>, method_name=0x7f3c822439d4 "_enginerender", 
    method_len=<value optimized out>, cache_entry=0x7fffe8bb4220, cache_slot=0, param_count=5, params=0x7fffe8bb3ee0) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:9610
#48 0x00007f3c82154bb2 in zim_Phalcon_Mvc_View_render (execute_data=<value optimized out>, return_value=0x7fffe8bb4630) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:95455
#49 0x00007f3c811d2521 in nb_execute_internal (execute_data=0x7f3c89415160, return_value=0x7fffe8bb4630) at /tingyun/nbprof/nbprof.c:381
#50 0x00007f3c8275183f in xdebug_execute_internal (current_execute_data=0x7f3c89415160, return_value=0x7fffe8bb4630) at /data/src/xdebug/xdebug.c:2012
#51 0x00007f3c81f9eb08 in zephir_call_function_opt (fci=0x7fffe8bb44d0, fci_cache=0x7fffe8bb4520, info=<value optimized out>, params=<value optimized out>)
    at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:7718
#52 0x00007f3c81f9f109 in zephir_call_user_function (object_pp=<value optimized out>, obj_ce=<value optimized out>, type=<value optimized out>, function_name=<value optimized out>, 
    retval_ptr=0x7fffe8bb4630, cache_entry=0x0, cache_slot=0, param_count=3, params=0x7fffe8bb46d0, info=0x7fffe8bb45f0) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:9409
#53 0x00007f3c81f9f6a7 in zephir_call_class_method_aparams (return_value_ptr=0x0, ce=0x15cad00, type=zephir_fcall_method, object=<value optimized out>, method_name=0x7f3c82247896 "render", 
    method_len=<value optimized out>, cache_entry=0x0, cache_slot=0, param_count=3, params=0x7fffe8bb46d0) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:9610
#54 0x00007f3c821a7613 in zim_Phalcon_Mvc_Application_handle (execute_data=<value optimized out>, return_value=0x7f3c894150d0) at /data/src/cphalcon/build/php7/64bits/phalcon.zep.c:81740
#55 0x00007f3c811d2521 in nb_execute_internal (execute_data=0x7f3c89415100, return_value=0x7f3c894150d0) at /tingyun/nbprof/nbprof.c:381
#56 0x00007f3c8275183f in xdebug_execute_internal (current_execute_data=0x7f3c89415100, return_value=0x7f3c894150d0) at /data/src/xdebug/xdebug.c:2012
#57 0x000000000087f722 in ZEND_DO_FCALL_SPEC_HANDLER (execute_data=0x7f3c89415030) at /data/src/php-7.0.0/Zend/zend_vm_execute.h:844
#58 0x0000000000847e70 in execute_ex (ex=<value optimized out>) at /data/src/php-7.0.0/Zend/zend_vm_execute.h:417
#59 0x00007f3c814084c0 in new_execute_ex (execute_data=0x7f3c89415030) at /PHP/64/source/php7.0.0_nzts/ext/apm/apm.c:736
#60 0x00007f3c811d263e in nb_execute_ex (execute_data=0x7f3c89415030) at /tingyun/nbprof/nbprof.c:305
#61 0x00007f3c82751ef7 in xdebug_execute_ex (execute_data=0x7f3c89415030) at /data/src/xdebug/xdebug.c:1867
#62 0x000000000089a69b in zend_execute (op_array=0x7f3c89481000, return_value=<value optimized out>) at /data/src/php-7.0.0/Zend/zend_vm_execute.h:458
#63 0x00000000008095f3 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /data/src/php-7.0.0/Zend/zend.c:1428
#64 0x00000000007ac2c0 in php_execute_script (primary_file=0x7fffe8bb7470) at /data/src/php-7.0.0/main/main.c:2471
#65 0x00000000008a83e8 in main (argc=<value optimized out>, argv=<value optimized out>) at /data/src/php-7.0.0/sapi/fpm/fpm/fpm_main.c:1944

@Jurigag
Copy link
Contributor

Jurigag commented Aug 23, 2016

Disable xdebug and post backtrace again. Also post whole backtrace, from beginning to end, this is beginning from #24 jump/function execute.

Also reading symbols etc is not needed, only backtrace of functions executed.

@kcloze
Copy link

kcloze commented Aug 23, 2016

Disable xdebug ,it's ok now.
Thanks.

@stamster
Copy link
Contributor

stamster commented Aug 23, 2016

xdebug - a tool which can cause many issues, and not only with Phalcon!

@kcloze
Copy link

kcloze commented Aug 23, 2016

We find it maybe same error code in view script.

@virgofx
Copy link
Contributor

virgofx commented Aug 23, 2016

@Jurigag Can you help provide any more insight as I think this issue seems to be persistent with Xdebug + PHP7-phalcon -- definitely an issue in my opinion (currently disabled in my testing)

@stamster
Copy link
Contributor

IMHO, xdebug shoudn't be used at all with Phalcon since it interferes with PHP internals.

For instance, ionCube loader and Xdebug cannot work together officially for the same reason.

@Jurigag
Copy link
Contributor

Jurigag commented Aug 23, 2016

@virgofx what yu mean ? Just don't use phalcon and xdebug, don't see any other soultion to be honest, and there can be way too much things causing this.

@virgofx
Copy link
Contributor

virgofx commented Aug 24, 2016

@stamster - I guess I'm curious as to why? Phalcon worked fine with PHP56 and XDebug. Debugging is very useful in enterprise and large applications. Why don't we just get a few more stack traces and see if @andresgutierrez can look into it?

@Jurigag
Copy link
Contributor

Jurigag commented Aug 24, 2016

Then post whole script to reproduce, best repository, whole stacktrace with both php and phalcon compiled as debug and then someone can look into this.

@stale
Copy link

stale bot commented Apr 16, 2018

Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues

@stale stale bot added the stale Stale issue - automatically closed label Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale issue - automatically closed
Projects
None yet
Development

No branches or pull requests

6 participants