Skip to content

Subscribe Errors with DCOS/Mesos #349

@kstedman9

Description

@kstedman9

I am trying to write a service that will subscribe to the Mesos Master to watch all the Tasks that are being run on the Cluster. So I started with the mwatch.go to see if things will work properly with DCOS. When I run the code I get an error :
Error: bufio.Scanner: token too long

So I started debugging through the code to try to figure out what may be happening and I found a way to get it to work. I saw talk about it in another thread but that has been closed.

If I change the httpcli/http.go code and change the recordIOSourceFactory function to this it works all the time:

func recordIOSourceFactory(r io.Reader) encoding.Source {
	return func() framing.Reader { return recordio.NewReader(r, recordio.MaxMessageSize(1<<23)) }
}

Is there a way to change this without copying much of the code base or just changing the actual code like I did? I have not found any way to accomplish this.

I have tried many different numbers there but only 1<<23 seems to work. If I use less than that I get an error in other parts of the code. For example if I use 1<<22 I get this error: "Error: oversized frame, max size exceeded"

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