Skip to content

Previewing alerts fails with "too many substreams open" due to case similarity process #280

Closed
@fl0wc0ntr0l

Description

@fl0wc0ntr0l

Request Type

Bug

Work Environment

Question Answer
OS version (server) Ubuntu 16.04 LTS
OS version (client) Win10
TheHive version / git hash 2.12.1
Package Type Docker
Browser type & version Chrome v60

Problem Description

Attempting to preview certain alerts gives an error:

AlertEventCtrl: Cannot open substream for key 'Some([redacted])': too many substreams open

Steps to Reproduce

Not sure. This only seems to happen sporadically. Some alerts seem to cause this error, some don't. At a guess, alerts that exceed some unwritten threshold of similar cases seem to cause this error.

Possible Solutions

The problem appears to originate when finding similar cases to a particular alert. This seems to open too many substreams (to what, I have no idea) and cause previewing the alert to fail. See logs below.

Complementary information

Log info of a failure:

[info] o.e.ErrorHandler - GET /api/alert/[redacted]?similarity=1 returned 500
java.lang.IllegalStateException: Cannot open substream for key 'Some([redacted])': too many substreams open
        at akka.stream.impl.fusing.GroupBy$$anon$1.onPush(StreamOfStreams.scala:294)
        at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:747)
        at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:710)
        at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:616)
        at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:471)
        at akka.stream.impl.fusing.GraphInterpreterShell.receive(ActorGraphInterpreter.scala:423)
        at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:603)
        at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$shortCircuitBatch(ActorGraphInterpreter.scala:594)
        at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:619)
        at akka.actor.Actor$class.aroundReceive(Actor.scala:497)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions