@forge/realtime throws exception in publishGlobal

Hello,

We’re facing sporadic exception when using @forge/realtime.

SyntaxError: Unexpected token '<', "<html>
<h"... is not valid JSON
at JSON.parse (<anonymous>)
at _ (/mnt/wrapper/wrapper_v22_85.cjs:2:1301355)
at o (/mnt/wrapper/wrapper_v22_85.cjs:2:1301121)
at fullyReadBody (/mnt/wrapper/wrapper_v22_85.cjs:2:895317)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async b (/mnt/wrapper/wrapper_v22_85.cjs:2:1301204)
at async publishGlobal (webpack://OUR_APP/node_modules/.pnpm/@forge+realtime@0.3.0/node_modules/@forge/realtime/out/publish.js:110:1)
at async OurService.queueEventListener (webpack://OUR_APP/src/OurService.ts:58:7)
at async Object.cardContentQueueHandler (webpack://OUR_APP/src/OurHandler.ts:27:10)
at async /mnt/wrapper/wrapper_v22_85.cjs:2:1276411

The content we’re trying to publish is a valid JSON string.

Is there a limit on the payload size ? This failing one is about ~18Kb

Can someone shed lights on this ?

:folded_hands:

1 Like

Hi @GuillaumeBero, I had a look, and I believe this issue was caused by our backend systems not handling the recent uptake of Forge realtime traffic well.

I’ve adjusted our scaling rules, and our monitoring indicates that the errors have decreased. Are you still encountering these errors now?

1 Like

Many thanks, will keep you posted if it happens again, but it was rather frequent.

1 Like