Crossbar Thruway工作人员崩溃

时间:2016-04-18 03:54:57

标签: crossbar thruway

我有一个带有PHP Thruway工作人员的Crossbar.io服务器。最近,我开始收到以下错误。它现在每天发生一次:

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.

有人知道热,以防止这种情况吗?

如果失败,如何在这种情况下自动重启工作人员?

1 个答案:

答案 0 :(得分:0)

我在linux中使用MONIT检查crossbar-controler进程并添加以下行解决了它:

如果孩子&lt; 3然后重新启动

3是crossbar-controler对我的环境具有的os子进程数。如果它们中的任何一个退出,那么crossbar会重新启动并通知我。您必须检查已运行的子进程数:

sudo service crossbar status。

这解决了错误退出工作程序,但需要重新启动crossbar-controler。我确信必须是解决问题的横杆/高速路。 理想的方法是尝试捕获php的所有可能错误,以防止致命的工作人员退出。

由于