2016-04-18 46 views
0

我有一個Crossbar.io服務器與PHP高速公路工人。最近,我開始得到以下錯誤。它現在每天大概發生一次:Crossbar高速公路工人崩潰

2016-04-17T21:08:12+0000 [Router  9572] Unable to format event {'log_logger': <Logger 'crossbar.router.protocol.WampWebSocketServerProtocol'>, 'log_time': 1460927292.17918, 'log_source': None, 'log_format': 'Traceback (most recent call last):\n File "/usr/local/lib/python2.7/site-packages/autobahn/wamp/websocket.py", line 88, in onMessage\n for msg in self._serializer.unserialize(payload, isBinary):\n File "/usr/local/lib/python2.7/site-packages/autobahn/wamp/serializer.py", line 106, in unserialize\n raise ProtocolError("invalid serialization of WAMP message ({0})".format(e))\nProtocolError: invalid serialization of WAMP message (Expected object or value)\n'}: tuple index out of range 
2016-04-17T21:08:15+0000 [Guest  9583] The connected has closed with reason: close 
2016-04-17T21:08:19+0000 [Guest  9583] PHP Fatal error: Call to a member function call() on null in /var/www/html/pickupServer/vendor/voryx/thruway/src/Thruway/ClientSession.php on line 106 
2016-04-17T21:08:19+0000 [Guest  9583] Fatal error: Call to a member function call() on null in /var/www/html/pickupServer/vendor/voryx/thruway/src/Thruway/ClientSession.php on line 106 
2016-04-17T21:08:19+0000 [Controller 9565] Guest worker2 exited with error A process has ended with a probable error condition: process ended with exit code 255. 

有沒有人知道熱點阻止這個?

如果在這種情況下出現故障,我該如何自動重啓工人?

+0

你知道你使用的是什麼版本的Thruway? ('composer show | grep voryx/thruway') – mbonneau

回答

0

我解決它與MONIT Linux的檢查橫樑,CONTROLER過程,添加以下行:

如果孩子< 3然後重新啓動

3是多少OS子進程是個交叉CONTROLER對我環境。如果它們中的任何一個退出,則交叉開關自動重新啓動並通知我。您必須檢查您正在使用的子進程的數量:

sudo服務交叉開關狀態。

這樣可以解決錯誤退出問題,但需要花費重新啓動交叉控制器。我深信,必須成爲解決問題的方法。 理想的方法是嘗試捕獲所有可能的PHP錯誤,以防止致命的工人退出。

謝謝