The encoder has a 1GB upper limit on message size. You're right that it might not be documented. Or adjustable, which perhaps it should be, but then you need to make sure both ends have the same setting. It's all rather clumsy, writing big blobs on a network. See https://github.com/golang/go/issues/14140.
-rob On Wed, May 16, 2018 at 5:36 PM, Carsten Orthbandt < [email protected]> wrote: > On my system the command > > godoc -v -index -index_files=/var/tmp/godoc_index.db -write_index > > runs for quite a while, then finishes with a warning message about the gob > encoder: > > 2018/05/16 14:54:23 initialize file systems > 2018/05/16 14:54:23 updating index... > 2018/05/16 15:11:46 index updated (1042.388139246s, 519738767 bytes of > source, 38378 files, 15129025 lines, 343889 unique words, 20260689 spots) > 2018/05/16 15:11:46 before GC: bytes = 11159155064 footprint = 13770511160 > 2018/05/16 15:11:47 after GC: bytes = 6213594416 footprint = 13770511160 > 2018/05/16 15:11:47 writing index file /var/tmp/godoc_index.db > 2018/05/16 15:11:57 gob: encoder: message too big > > It _does_ write /var/tmp/godoc_index.db but apparently it's pretty much > empty (1.1kB in size). > > I can't find anything in the Github issues on this. Is it a known problem > and I'm stupid? Should I file a bug? > > (I want to run godoc as a local service and avoid having the indexer run > from scratch on every boot) > > Best Regards, > Carsten > > > carsten@xaos ~ $ go env > GOARCH="amd64" > GOBIN="" > GOCACHE="/home/carsten/.cache/go-build" > GOEXE="" > GOHOSTARCH="amd64" > GOHOSTOS="linux" > GOOS="linux" > GOPATH="/home/carsten/go" > GORACE="" > GOROOT="/usr/local/go" > GOTMPDIR="" > GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" > GCCGO="gccgo" > CC="gcc" > CXX="g++" > CGO_ENABLED="1" > CGO_CFLAGS="-g -O2" > CGO_CPPFLAGS="" > CGO_CXXFLAGS="-g -O2" > CGO_FFLAGS="-g -O2" > CGO_LDFLAGS="-g -O2" > PKG_CONFIG="pkg-config" > GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 > -fdebug-prefix-map=/tmp/go-build043246410=/tmp/go-build > -gno-record-gcc-switches" > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
