go-carbon icon indicating copy to clipboard operation
go-carbon copied to clipboard

Abitrary limit in carbonlink response size

Open zivillian opened this issue 4 years ago • 4 comments

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?

zivillian avatar Jun 30 '21 16:06 zivillian

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....

deniszh avatar Jun 30 '21 18:06 deniszh

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

zivillian avatar Jun 30 '21 18:06 zivillian

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

deniszh avatar Jun 30 '21 20:06 deniszh

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

zivillian avatar Jul 01 '21 09:07 zivillian