metricq / metricq-sink-websocket

🕸 A MetricQ sink, which provides live data to consumers over WebSocket connections
GNU General Public License v3.0
2 stars 0 forks source link

Unretrieved exception in MetricqWebSocketResponse.flush() #2

Closed kinnarr closed 4 years ago

kinnarr commented 5 years ago

Oct 28 15:24:49 igel metricq-sink-websocket[26658]: 2019-10-28 15:24:49,068 [WARNING ] [aiohttp.websocket   ] websocket connection is closing.
Oct 28 15:24:49 igel metricq-sink-websocket[26658]: 2019-10-28 15:24:49,069 [ERROR   ] [asyncio             ] Task exception was never retrieved
Oct 28 15:24:49 igel metricq-sink-websocket[26658]: future: <Task finished coro=<Sink._on_data_message() done, defined at /home/service/metricq/python/metricq/sink.py:74> exception=RuntimeError('unable to perform operation on <TCPTransport closed=True reading=False 0x557d
Oct 28 15:24:49 igel metricq-sink-websocket[26658]: Traceback (most recent call last):
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:   File "/home/service/metricq/python/metricq/sink.py", line 84, in _on_data_message
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:     await self._on_data_chunk(metric, data_response)
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:   File "/home/service/metricq/python/metricq/sink.py", line 92, in _on_data_chunk
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:     await self.on_data(metric, Timestamp(last_timed), value)
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:   File "/home/service/metricq-sink-websocket/metricq_sink_websocket/sink.py", line 120, in on_data
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:     await ws.send_data(primary_metric, timestamp, value)
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:   File "/home/service/metricq-sink-websocket/metricq_sink_websocket/web_socket.py", line 27, in send_data
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:     await self.flush()
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:   File "/home/service/metricq-sink-websocket/metricq_sink_websocket/web_socket.py", line 41, in flush
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:     await self.send_json({"data": self._buffer})
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:   File "/home/service/envs/websocket/lib/python3.7/site-packages/aiohttp/web_ws.py", line 296, in send_json
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:     await self.send_str(dumps(data), compress=compress)
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:   File "/home/service/envs/websocket/lib/python3.7/site-packages/aiohttp/web_ws.py", line 283, in send_str
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:     await self._writer.send(data, binary=False, compress=compress)
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:   File "/home/service/envs/websocket/lib/python3.7/site-packages/aiohttp/http_websocket.py", line 643, in send
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:     await self._send_frame(message, WSMsgType.TEXT, compress)
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:   File "/home/service/envs/websocket/lib/python3.7/site-packages/aiohttp/http_websocket.py", line 614, in _send_frame
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:     self.transport.write(header + message)
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:   File "uvloop/handles/stream.pyx", line 671, in uvloop.loop.UVStream.write
Oct 28 15:24:49 igel metricq-sink-websocket[26658]:   File "uvloop/handles/handle.pyx", line 159, in uvloop.loop.UVHandle._ensure_alive
Oct 28 15:24:49 igel metricq-sink-websocket[26658]: RuntimeError: unable to perform operation on <TCPTransport closed=True reading=False 0x557df25d1128>; the handler is closed```