You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have deployed a statsite and it has about 2000+ metrics per flush.
Today we found the executions of sinks/graphite.py never stopped and Graphite can't received any data.
So I added logs in script, and it shows that the for-loop which iterates sys.stdin never stops.
The following code seems like a fix:
while True:
line = sys.stdin.readline()
if line.strip() == "":
break
if len(graphite.metrics) >= METRICS_PER_FLUSH:
graphite.send_metrics()
graphite.append(line.strip())
graphite.send_metrics()
Is there any situation that stdin for stream_cmd contains no EOF?
The text was updated successfully, but these errors were encountered:
pfctgeorge
changed the title
it seems that stdin of stream_cmd has not EOF
it seems that the stdin of stream_cmd has no EOF
Apr 13, 2018
I suppose the design was intended to keep streaming all the time and only stop if statsite itself was completely shut down. We should probably add this behind a configuration or flag so that people can select what they want.
We have deployed a statsite and it has about 2000+ metrics per flush.
Today we found the executions of sinks/graphite.py never stopped and Graphite can't received any data.
So I added logs in script, and it shows that the for-loop which iterates sys.stdin never stops.
The following code seems like a fix:
Is there any situation that stdin for stream_cmd contains no EOF?
The text was updated successfully, but these errors were encountered: