jbmusso / gremlin-javascript

JavaScript tools for graph processing in Node.js and the browser inspired by the Apache TinkerPop API
MIT License
214 stars 63 forks source link

"WebSocket closed" when query is large #71

Closed guyellis closed 7 years ago

guyellis commented 7 years ago

If I execute:

const query = 'A reasonable amount of gremlin (28,683 bytes)';
client.execute(query, (err, results) => {
...

then things work as expected.

For

const query = 'A large amount of gremlin (83,696 bytes)';
client.execute(query, (err, results) => {
...

I get a WebSocket closed error.

What's the limit to the size of the query and any options that can be used to increase that?

jbmusso commented 7 years ago

This needs to be configured in the gremlin-server.yml file as well :).

guyellis commented 7 years ago

Is it the maxContentLength?

guyellis commented 7 years ago

If that is the setting, is there a way to query the server (from the client using this module) to get back the contents of that file (or this value) to determine the max size of a query?

guyellis commented 7 years ago

I just confirmed that upping maxContentLength will solve this problem so closing. (Thanks for response @jbmusso and apologies for asking this here.)

Would love to know if there's a way to get that info back per the previous comment if you know that answer.