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

Maximum call stack exceeded when connecting to a database running in distributed mode #447

Open
miosman opened this issue Aug 19, 2021 · 2 comments

Comments

@miosman
Copy link

miosman commented Aug 19, 2021

Facing an issue with db sessions failing with the following error only when connecting to a database in distributed mode, on a single instance server the issue doesn't occur.

/opt/migration/node_modules/orientjs/lib/client/network/protocol37/operation.js:447
Operation.prototype.consume = function(buffer, offset) {
                                      ^
RangeError: Maximum call stack size exceeded
    at Operation.consume (/opt/migration/node_modules/orientjs/lib/client/network/protocol37/operation.js:447:39)
    at ONetworkConnection.Connection.process (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:437:17)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:344:20)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)
    at ONetworkConnection.Connection.handleSocketData (/opt/migration/node_modules/orientjs/lib/client/network/conn.js:354:12)

I attempted to debug the issue by adding log messages around the handleSocketData and Operation.prototype.consume methods and from the logs it seems the issue manifests after the server pushes the list of servers in the cluster.
Snippet of logs

buffer�P��������172.25.0.3:2424����172.25.0.5:2424

after that message is received handleSocketData goes into an infinite recursive loop until the stack limit is hit. The data buffer during the period would be something like this

<Buffer 00 00 00 00 12 00 00 00 00 64>

environment:
node: v10.20.1
orientjs: 3.0.11
orientdb: 3.0.38, 3.1.12, 3.2.0

@amnous
Copy link

amnous commented Mar 22, 2022

Hi @miosman , Have you found a solution for this issue? Even I am facing the same issue.

@miosman
Copy link
Author

miosman commented Mar 22, 2022

unfortunately not, project seems to be abandoned so probably try the Java driver instead.

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

2 participants