2015-12-21 67 views
2

每當我嘗試開始調試任何事情時,我得到一個502壞柵極。當試圖調試得到一個nginx 502與PHP 7.0.1和Xdebug 2.4.0RC4-dev

我怎樣才能找出什麼是錯的?

PHP 7.0.1-1+deb.sury.org~trusty+2 (cli) (NTS) 
Copyright (c) 1997-2015 The PHP Group 
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies 
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies 
with Xdebug v2.4.0RC4-dev, Copyright (c) 2002-2015, by Derick Rethans 

/var/log/php7.0-fpm.log

[21-Dec-2015 04:12:16] NOTICE: configuration file /etc/php/7.0/fpm/php-fpm.conf test is successful 

[21-Dec-2015 04:12:16] NOTICE: fpm is running, pid 1460 
[21-Dec-2015 04:12:16] NOTICE: ready to handle connections 
[21-Dec-2015 04:12:16] NOTICE: systemd monitor interval set to 10000ms 
[21-Dec-2015 04:17:23] NOTICE: Terminating ... 
[21-Dec-2015 04:17:23] NOTICE: exiting, bye-bye! 
[21-Dec-2015 04:17:23] ALERT: [pool www] pm.max_children must be a positive value 
[21-Dec-2015 04:17:23] ERROR: failed to post process the configuration 
[21-Dec-2015 04:17:23] ERROR: FPM initialization failed 
[21-Dec-2015 04:18:19] NOTICE: fpm is running, pid 6941 
[21-Dec-2015 04:18:19] NOTICE: ready to handle connections 
[21-Dec-2015 04:18:19] NOTICE: systemd monitor interval set to 10000ms 
[21-Dec-2015 04:19:03] WARNING: [pool www] child 6945 exited on signal 11 (SIGSEGV) after 43.874016 seconds from start 
[21-Dec-2015 04:19:03] NOTICE: [pool www] child 6975 started 

所有其他日誌都清楚。我能做什麼?我怎樣才能找出什麼是錯的? 這是一個puphpet.com機器。

+0

你解決這個問題?我正在看Jan 12 02:19:47 vagrant-ubuntu-wily-64 kernel:[9067.322659] php-fpm7.0 [16660]:segfault at 11 ip 00007f91ebbb7082 sp 00007ffdaf8d80c0 xdebug.so錯誤4 [7f91ebb8e000 + 38000] – Steve

+0

嗨史蒂夫,可惜我找不到解決方案或原因:( –

+0

謝謝。我打了3天后放棄了。有一個預感它與php7中的xdebug問題 – Steve

回答

1

這是一個Xdebug錯誤。通常我會嘗試將庫鎖定到特定版本,但由於Xdebug是開發人員的工具,並且由於PHP7剛剛推出,我將其切換爲遵循主人。

如果您發現您的版本存在問題,我建議您克隆回購,檢出標籤並自行編譯。

0

有時候是因爲PHP拋出了OOM錯誤。該Xdebug的默認配置

xdebug.var_display_max_depth = 15 

在同一時間,如果你設置

xdebug.collect_vars = 1 
    xdebug.collect_return = 1 
    xdebug.collect_params = 1 
    xdebug.show_local_vars = 1 
    xdebug.dump_undefined = 1 
    and so one 

這些選項花費太多的記憶。所以儘量改變像

xdebug.var_display_max_depth = 3 

(一個小號碼)或關閉那些花費這麼多內存的選項。

0

我有一個類似的問題,PHP 7.0.22-0ubuntu0.16.04.1和Xdebug v2.4.0。 我認爲你的xdebug版本不穩定。我通過升級Xdebug的版本解決了這個問題。

我建議你安裝Xdebug的最新版本,用pecl,不要用apt。

sudo apt-get remove php-xdebug 
sudo apt install php-pear php-dev 
sudo pecl install xdebug 

我目前的Xdebug的版本是V2.5.5,這個問題已經消失

https://xdebug.org/docs/install