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

Cypher query scriptEvaluationTimeout in 30s #348

Open
SarthakGhosh16 opened this issue Jun 5, 2020 · 1 comment
Open

Cypher query scriptEvaluationTimeout in 30s #348

SarthakGhosh16 opened this issue Jun 5, 2020 · 1 comment

Comments

@SarthakGhosh16
Copy link

SarthakGhosh16 commented Jun 5, 2020

@dwitry
The issue is regarding #316 #335

Previously we were using JS 0.3.x and hence I couldn't test out this update but now we have moved to JS 0.4.1 and cypher-gremlin-server-plugin-1.0.3-all.jar which has the change for
scriptEvaluationTimeout
#316

On updating this, I found that now the script gets terminated in 30s (default value in the code)

In my gremlin-server.yaml, I have this value set to 120s but this is not being followed. I'm attaching my gremlin-server.yaml below.

host: 0
port: 8182
scriptEvaluationTimeout: 120000
channelizer: org.apache.tinkerpop.gremlin.server.channel.WsAndHttpChannelizer
threadPoolWorker: 16
gremlinPool: 32
graphs: {
  graph: conf/janusgraph-hbase.properties
}
scriptEngines: {
  gremlin-groovy: {
    plugins: { org.janusgraph.graphdb.tinkerpop.plugin.JanusGraphGremlinPlugin: {},
               org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
               org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin: {},
               org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math,org.opencypher.gremlin.traversal.CustomFunctions,org.opencypher.gremlin.traversal.CustomPredicate], methodImports: [java.lang.Math#*,org.opencypher.gremlin.traversal.CustomPredicate#*,org.opencypher.gremlin.traversal.CustomFunctions#*]},
               org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}},
    scripts: [scripts/empty-sample.groovy], 
    staticImports: ['org.opencypher.gremlin.process.traversal.CustomPredicates.*','org..opencypher.gremlin.traversal.CustomFunctions.*']}}
serializers:
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry,org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistryV3d0] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { serializeResultToString: true }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  # Older serialization versions for backwards compatibility:
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0, config: {ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
  - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
processors:
  - { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
  - { className: org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor, config: { cacheExpirationTime: 600000, cacheMaxSize: 1000 }}
  - { className: org.opencypher.gremlin.server.op.cypher.CypherOpProcessor }
metrics: {
  consoleReporter: {enabled: true, interval: 180000},
  csvReporter: {enabled: false, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
  jmxReporter: {enabled: false},
  slf4jReporter: {enabled: false, interval: 180000},
  gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
  graphiteReporter: {enabled: false, interval: 180000}}
threadPoolBoss: 1
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
maxContentLength: 81928192
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferLowWaterMark: 32768
writeBufferHighWaterMark: 81928192

As you can see, I have mentioned scriptEvaluationTimeout in the file and the processor has been added too
- { className: org.opencypher.gremlin.server.op.cypher.CypherOpProcessor }

Am I missing something here?

I ran the cypher query through gremlin-console using 1.0.3 plugin and connecting to my gremlin-server remotely which uses the above gremlin-server.yaml

@SarthakGhosh16
Copy link
Author

I even tried

- { className: org.opencypher.gremlin.server.op.cypher.CypherOpProcessor, config: { scriptEvaluationTimeout: 120000 }}

but this returned an error that scriptEvaluationTimeout arg is unknown

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