go-graphite / go-carbon

Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister
MIT License
805 stars 123 forks source link

Abitrary limit in carbonlink response size #415

Open zivillian opened 3 years ago

zivillian commented 3 years ago

Today I've seen multiple errors in my go-carbon.log file:

INFO [carbonlink] reply error {"peer": "127.0.0.1:40971", "error": "Frame too large for buffer size"}

which seems to be caused by:

https://github.com/go-graphite/go-carbon/blob/72fbe671c244718452557d06975d2c28d59029f4/cache/carbonlink.go#L324-L326

Is there any reason for this limit, or why it's hardcoded?

deniszh commented 3 years ago

Hi @zivillian ,

I doubt that this error is caused by frame size. I'm wondering where it come from... I do not see such error text in go-carbon at all....

zivillian commented 3 years ago

The error message is defined in: https://github.com/go-graphite/go-carbon/blob/72fbe671c244718452557d06975d2c28d59029f4/vendor/github.com/lomik/graphite-pickle/framing/conn.go#L23

and raised in: https://github.com/go-graphite/go-carbon/blob/72fbe671c244718452557d06975d2c28d59029f4/vendor/github.com/lomik/graphite-pickle/framing/conn.go#L130-L135

which is invoked at: https://github.com/go-graphite/go-carbon/blob/72fbe671c244718452557d06975d2c28d59029f4/cache/carbonlink.go#L280-L282

deniszh commented 3 years ago

Ah, thank for looking it, @zivillian ! But looks like only @lomik knows why limit is there... We can make it configurable, though.

zivillian commented 3 years ago

Making it configurable would be great and should solve our issue without affecting other users.