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 size exceeded #292

Closed
maithanhtan opened this issue Jun 27, 2024 · 6 comments
Closed

Maximum call stack size exceeded #292

maithanhtan opened this issue Jun 27, 2024 · 6 comments

Comments

@maithanhtan
Copy link

Describe the bug
When enable delta compression in channel. Sometime i get this error randomly. Can you help to suggest what should i do for it. Tks

index.mjs:1888 Uncaught (in promise) RangeError: Maximum call stack size exceeded at Writer.putArray (index.mjs:1888:16) at applyDelta (index.mjs:1961:22) at JsonCodec.applyDeltaIfNeeded (index.mjs:2003:32) at Subscription._handlePublication (index.mjs:1029:71) at Centrifuge._handlePublication (index.mjs:3562:13) at Centrifuge._handlePush (index.mjs:3577:18) at Centrifuge._dispatchReply (index.mjs:3053:22) at eval (index.mjs:3026:33) putArray @ index.mjs:1888 applyDelta @ index.mjs:1961 applyDeltaIfNeeded @ index.mjs:2003 _handlePublication @ index.mjs:1029 _handlePublication @ index.mjs:3562 _handlePush @ index.mjs:3577 _dispatchReply @ index.mjs:3053 eval @ index.mjs:3026 Promise.then (async) _dispatchSynchronized @ index.mjs:3030 eval @ index.mjs:3018 Promise.then (async) _dataReceived @ index.mjs:3013 onMessage @ index.mjs:2769 _transport.onmessage @ index.mjs:1370

I am using centrifugo-js 5.2.1

@FZambia
Copy link
Member

FZambia commented Jun 27, 2024

Hello, hard to say without a way to reproduce. Can you find a reproducer? How your data looks like? What is the size of it? Also, please provide server configuration.

@maithanhtan
Copy link
Author

Hi @FZambia
Here is my server configuration
{
"log_level": "trace",
"debug": true,
"token_hmac_secret_key": "xxx",
"admin_password": "xxx",
"admin_secret": "xxx",
"api_key": "xxx",
"allowed_origins": ["http://localhost:3000", "*"],
"admin": true,
"client_insecure": false,
"engine": "memory",
"namespaces": [
{
"name": "mkt",
"allowed_delta_types": [
"fossil"
],
"force_positioning": true,
"delta_publish": true,
"history_size": 1,
"history_ttl": "60s",
"allow_subscribe_for_client": true
},
{
"name": "personal",
"allowed_delta_types": [
"fossil"
],
"force_positioning": true,
"delta_publish": true
},
{
"name": "algo",
"allowed_delta_types": [
"fossil"
],
"force_positioning": true,
"delta_publish": true
}
],
"grpc_api": true,
"grpc_api_key": "xxx"
}

It seem that i am getting error when receive delta change message from mkt channel. I will try to get a way to reproduce it and update u soon. Tks

@FZambia
Copy link
Member

FZambia commented Jun 27, 2024

Thx! I have an idea what could be the problem, will come with a possible fix very soon. In the meanwhile, if you find a reproducer – will be a great help. Some insights about data size is also helpful - as I think it may be related.

@FZambia
Copy link
Member

FZambia commented Jun 27, 2024

@maithanhtan could you please try 5.2.2 – I believe it should fix the exception. Though a bit shot in the dark since there was no reproducer.

@FZambia
Copy link
Member

FZambia commented Jul 2, 2024

@maithanhtan hello, did you have a chance to try?

@FZambia
Copy link
Member

FZambia commented Jul 8, 2024

Please re-open if the issue persists with 5.2.2

@FZambia FZambia closed this as completed Jul 8, 2024
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