alumae / kaldi-gstreamer-server

Real-time full-duplex speech recognition server, based on the Kaldi toolkit and the GStreamer framwork.
BSD 2-Clause "Simplified" License
1.07k stars 341 forks source link

re: worker closed issue #22

Closed rohithkodali closed 9 years ago

rohithkodali commented 9 years ago

Hi Alumae,

the connection issue is resolved when i start running the server in a local PC from Azure cloud it worked fine for a few days but again it throw this exception

INFO 2015-07-21 11:35:36,189 200 PUT /client/dynamic/recognize (175.101.19.134) 29925.95ms INFO 2015-07-21 11:35:36,189 Everything done INFO 2015-07-21 11:35:37,208 New worker available <main.WorkerSocketHandler object at 0x7f7dc570c150> INFO 2015-07-21 12:02:45,748 d591db57-bbc3-43bf-a9b5-2bf4b2d208a8: OPEN: user='none', content='none' INFO 2015-07-21 12:02:45,748 d591db57-bbc3-43bf-a9b5-2bf4b2d208a8: Using worker <main.HttpChunkedRecognizeHandler object at 0x7f7dc570c650> INFO 2015-07-21 12:02:45,748 Worker <main.WorkerSocketHandler object at 0x7f7dc61b76d0> leaving INFO 2015-07-21 12:02:45,748 d591db57-bbc3-43bf-a9b5-2bf4b2d208a8: Receiving 'close' from worker ERROR 2015-07-21 12:02:46,736 Uncaught exception Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/tornado-4.2-py2.7-linux-x86_64.egg/tornado/http1connection.py", line 561, in _read_fixed_body yield gen.maybe_future(delegate.data_received(body)) File "/usr/local/lib/python2.7/dist-packages/tornado-4.2-py2.7-linux-x86_64.egg/tornado/httpserver.py", line 282, in data_received return self.delegate.data_received(chunk) File "/usr/local/lib/python2.7/dist-packages/tornado-4.2-py2.7-linux-x86_64.egg/tornado/web.py", line 1974, in data_received return self.handler.data_received(data) File "/home/user/speech/server/kaldi-gstreamer-server/kaldigstserver/master_server.py", line 142, in data_received self.worker.write_message(chunk, binary=True) File "/usr/local/lib/python2.7/dist-packages/tornado-4.2-py2.7-linux-x86_64.egg/tornado/websocket.py", line 213, in write_message raise WebSocketClosedError() WebSocketClosedError

alumae commented 9 years ago

What about the worker log? Please format it as code when you paste it here.

rohithkodali commented 9 years ago

There are 4 workers available for the server but none is able to decode. i have uploaded them in this link http://expirebox.com/download/258a272edc742f86e821dc76e722766c.html

worker-0.log is the one that the server decoded a file at last.

alumae commented 9 years ago

Thanks, I took a look. Yes, it seems that the connection between server and worker has just silently gone down and neither the server nor the worker is not aware of it.

One way to avoid this is to send "ping" messages every now and then between server and worker. I'll try to take a look at this today.

alumae commented 9 years ago

Please try the following: replace line 47 in kaldigstserver/worker.py as follows:

Original:

    WebSocketClient.__init__(self, url=uri)

Change to:

    WebSocketClient.__init__(self, url=uri, heartbeat_freq=10)

And test if this fixes your problem (should also fix the problem on Azure)

rohithkodali commented 9 years ago

updated it will test that and let you know.

rohithkodali commented 9 years ago

hi alumae it worked for two days with out any issue, you can close this issue.