tweag / nixpkgs-graph-explorer

Explore the nixpkgs dependency graph
MIT License
15 stars 0 forks source link

Cannot generate the graph when it is too large #31

Closed zz1874 closed 1 year ago

zz1874 commented 1 year ago

Describe the bug When generating a relatively large graph, an error message shows up: Error: Could not parse Gremlin query. Is it valid?.

To Reproduce After submitting the default query

g.V()
.filter{it.get().value('pname').matches('auto-multiple-choice')}
.repeat(outE().otherV().simplePath())
.until(__.not(outE().simplePath()))
.path()
.by('pname')
.by(label)

an error message shows up: Screenshot from 2023-03-14 15-26-23@2x and the docker log is as below

nixpkgs-graph-explorer-gremlin-1   | [WARN] AbstractEvalOpProcessor - Script evaluation exceeded the configured threshold for request [RequestMessage{, requestId=4abb214e-09ca-4340-82ef-1a8c4578f9b3, op='eval', processor='', args={gremlin=g.V()
nixpkgs-graph-explorer-gremlin-1   | .filter{it.get().value('pname').matches('auto-multiple-choice')}
nixpkgs-graph-explorer-gremlin-1   | .repeat(outE().otherV().simplePath())
nixpkgs-graph-explorer-gremlin-1   | .until(__.not(outE().simplePath()))
nixpkgs-graph-explorer-gremlin-1   | .path()
nixpkgs-graph-explorer-gremlin-1   | .by('pname')
nixpkgs-graph-explorer-gremlin-1   | .by(label), aliases={g=gReadOnly}, evaluationTimeout=5000}}]
nixpkgs-graph-explorer-gremlin-1   | java.util.concurrent.TimeoutException: Evaluation exceeded the configured 'evaluationTimeout' threshold of 5000 ms or evaluation was otherwise cancelled directly for request [g.V()
nixpkgs-graph-explorer-gremlin-1   | .filter{it.get().value('pname').matches('auto-multiple-choice')}
nixpkgs-graph-explorer-gremlin-1   | .repeat(outE().otherV().simplePath())
nixpkgs-graph-explorer-gremlin-1   | .until(__.not(outE().simplePath()))
nixpkgs-graph-explorer-gremlin-1   | .path()
nixpkgs-graph-explorer-gremlin-1   | .by('pname')
nixpkgs-graph-explorer-gremlin-1   | .by(label)]
nixpkgs-graph-explorer-gremlin-1   |    at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$1(GremlinExecutor.java:321)
nixpkgs-graph-explorer-gremlin-1   |    at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
nixpkgs-graph-explorer-gremlin-1   |    at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
nixpkgs-graph-explorer-gremlin-1   |    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
nixpkgs-graph-explorer-gremlin-1   |    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
nixpkgs-graph-explorer-gremlin-1   |    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
nixpkgs-graph-explorer-gremlin-1   |    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
nixpkgs-graph-explorer-gremlin-1   |    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
nixpkgs-graph-explorer-gremlin-1   |    at java.base/java.lang.Thread.run(Unknown Source)

If we increase the evaluation timeout by 50s instead of 5s, the graph can be generated, but it is quite hard to read. Screenshot from 2023-03-14 15-36-06@2x

Expected behavior We need a clearer visualization of a large graph and perhaps zoom in/out buttons.

GuillaumeDesforges commented 1 year ago

@zz1874 This was pre v1.0, how is it now?

zz1874 commented 1 year ago

We don't have this issue now.