Skip to content

Skip events which are too large to send

Eric Eastwood requested to merge 2609-skip-events-that-are-too-large into develop

Skip events which are too large to send. Sorry these messages are probably not worth the complexity of bridging. They are usually just trying to test the limits of Gitter or really long logs that should have been paired down in the first place.

Follow-up to !2313 (merged)

Part of #2609 (closed)

The import script was running into the following error:

matrix__bridge__applicationServicePort=9001 NODE_ENV=prod ./scripts/utils/gitter-to-matrix-historical-import-one-room.js --uri gıtlab/community
17 Jan 07:53:27 - opening socket: ws://cube.prod.gitter:1080/1.0/event/put
2023-01-17T07:53:28.926Z - info: Setting up Matrix bridge
2023-01-17T07:53:28.937Z - info: Matrix bridge listening on port 9001
2023-01-17T07:53:28.938Z - info: Ensuring profile info is up-to-date for the Matrix bridge user mxid=@gitter-badger:gitter.im
2023-01-17T07:53:29.014Z - info: Starting import script for gıtlab/community (5e05fbb7d73408ce4fd520a6) --> matrixHistoricalRoomId=!xxx:gitter.im (live matrixRoomId=!xxx:gitter.im)
MatrixHttpClient (REQ-1) { errcode: 'M_USER_IN_USE', error: 'User ID already taken.' }
2023-01-17T07:53:29.222Z - info: Indices configured category=persistence
2023-01-17T07:53:29.715Z - error: Error occurred while backfilling events for opts.uri=gıtlab/community gitterRoomId=5e05fbb7d73408ce4fd520a6: StatusError: sendEventAtTimestmap({ matrixRoomId: !hLWjcCxRKWuTPyfTmt:gitter.im }) failed 413: {"errcode":"M_TOO_LARGE","error":"event too large"}
    at _sendEventWrapper (./modules/matrix-bridge/lib/matrix-utils.js:897:15)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async MatrixUtils.sendEventAtTimestmap (./modules/matrix-bridge/lib/matrix-utils.js:918:17)
    at async ./modules/matrix-bridge/lib/gitter-to-matrix-historical-import.js:327:27
2023-01-17T07:53:29.717Z - warn: Waiting for this ongoing message send request to finish and bridged information stored...
redis handler failed during shutdown: TypeError: Cannot read property 'activeMasterClient' of undefined
Edited by Eric Eastwood

Merge request reports