8000 it seems that the stdin of stream_cmd has no EOF · Issue #278 · statsite/statsite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
it seems that the stdin of stream_cmd has no EOF #278
Open
@pfctgeorge

Description

@pfctgeorge

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0