Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket actor crashes for large payloads #26

Open
uvinw opened this issue Apr 24, 2018 · 0 comments
Open

WebSocket actor crashes for large payloads #26

uvinw opened this issue Apr 24, 2018 · 0 comments

Comments

@uvinw
Copy link

uvinw commented Apr 24, 2018

This issue only happens on the websocket protocol. On XHR streaming, the large payload is passed through to the Sock Actor without an issues. The JSON payload I am sending is 0.5 MB in size.

The following can be observed:
[debug] c.k.c.a.SockActor - Actor started: akka://play-dev-mode/user/StreamSupervisor-0/$$i
[debug] c.k.c.a.SockActor - Actor ended: akka://play-dev-mode/user/StreamSupervisor-0/$$i

I am provisioning the actor as follows:

private static final int STREAMING_QUOTA = 4096;
private static final int SIXTEEN = 16;

@Inject
public SockActorController(ActorSystem actorSystem) {
    this.actorSystem = actorSystem;
}

@Override
public SockJSSettings settings() {
    return new SockJSSettings().withStreamingQuota(STREAMING_QUOTA);
}

@Override
public SockJS sockjs() {
    return SockJS.Json.accept(req -> ActorFlow.<JsonNode,
            JsonNode>actorRef(out -> SockActor.props(out),
            SIXTEEN,
            OverflowStrategy.dropNew(),
            actorSystem).asJava());
}

Is STREAMING_QUOTA the bottleneck here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant