FAQ
We're using net/rpc and are finding that over time our gob Encoders end up
with large buffers. Looks like these are capped to 1GB and have a TODO
attached to them:

https://github.com/golang/go/blob/master/src/encoding/gob/decoder.go#L17

(That const has multiple uses.)

Since the stream is stateful it seems like the we need to restart our
connection in order to throw away the buffer? A new ServerCodec that resets
the encoder on one side will cause issues if I understand correctly?


--
-Naitik

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Dan Kortschak at Jan 11, 2016 at 11:32 pm
    See https://groups.google.com/d/msg/golang-nuts/Vb8nU34_DDk/VZw04IHpOlcJ
    and https://groups.google.com/d/msg/golang-nuts/Vb8nU34_DDk/_KxdmHbjqVwJ

    I have no idea why the TODO is still there.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Naitik Shah at Jan 12, 2016 at 2:50 am
    Thanks for the pointer -- looks like the same TODO.

    Looking into it more I was looking at master which has the 1GB limit
    introduced by https://go-review.googlesource.com/#/c/13660/. Go 1.5 which
    is what we're using doesn't have the 1GB limit. Strange how a
    just-less-than-1GB message can cause the buffer for top-level encoderState
    to explode but larger than 1GB messages would go thru fine and reset the
    buffer (though I'm not yet sure if the top level can actually get that
    large).


    -Naitik

    On Tue, Jan 12, 2016 at 3:32 AM, Dan Kortschak wrote:

    See https://groups.google.com/d/msg/golang-nuts/Vb8nU34_DDk/VZw04IHpOlcJ
    and https://groups.google.com/d/msg/golang-nuts/Vb8nU34_DDk/_KxdmHbjqVwJ

    I have no idea why the TODO is still there.

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.


    --
    -Naitik

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 11, '16 at 10:15p
activeJan 12, '16 at 2:50a
posts3
users2
websitegolang.org

2 users in discussion

Naitik Shah: 2 posts Dan Kortschak: 1 post

People

Translate

site design / logo © 2021 Grokbase