Blocking time-out #33

Open
opened 2021-08-05 03:24:04 -04:00 by lecris · 4 comments
Contributor

Probably related to login-qr Not sure what causes it, but it occurs on the chrome puppeteer side:

[API/@lecris:lecris.me/0] ERROR: Error handling request 102267 TimeoutError: Navigation timeout of 30000 ms exceeded
     at /opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/LifecycleWatcher.js:106:111
     at async FrameManager.waitForFrameNavigation (/opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:127:23)
     at async Frame.waitForNavigation (/opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:440:16)
     at async Page.waitForNavigation (/opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:829:16)
     at async Promise.all (index 0)
     at async Page.reload (/opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:822:24)
     at async MessagesPuppeteer._preparePage (file:///opt/synapse/bridges/matrix-puppeteer-line/puppet/src/puppet.js:160:4)
     at async MessagesPuppeteer.cancelLogin (file:///opt/synapse/bridges/matrix-puppeteer-line/puppet/src/puppet.js:347:4)
     at async Client.handleLine (file:///opt/synapse/bridges/matrix-puppeteer-line/puppet/src/client.js:273:20)
~~Probably related to `login-qr`~~ Not sure what causes it, but it occurs on the chrome puppeteer side: ``` [API/@lecris:lecris.me/0] ERROR: Error handling request 102267 TimeoutError: Navigation timeout of 30000 ms exceeded at /opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/LifecycleWatcher.js:106:111 at async FrameManager.waitForFrameNavigation (/opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:127:23) at async Frame.waitForNavigation (/opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:440:16) at async Page.waitForNavigation (/opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:829:16) at async Promise.all (index 0) at async Page.reload (/opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:822:24) at async MessagesPuppeteer._preparePage (file:///opt/synapse/bridges/matrix-puppeteer-line/puppet/src/puppet.js:160:4) at async MessagesPuppeteer.cancelLogin (file:///opt/synapse/bridges/matrix-puppeteer-line/puppet/src/puppet.js:347:4) at async Client.handleLine (file:///opt/synapse/bridges/matrix-puppeteer-line/puppet/src/client.js:273:20) ```
Author
Contributor

Another similar issue:

(node:2376016) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read property 'childElementCount' of null
    at MautrixController.parseReceiptList (./src/contentscript.js:745:81)
    at __puppeteer_evaluation_script__:1:51
    at ExecutionContext._evaluateInternal (/opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async ExecutionContext.evaluate (/opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
    at async MessagesPuppeteer._getMessagesUnsafe (file:///opt/synapse/bridges/matrix-puppeteer-line/puppet/src/puppet.js:1060:20)
    at async MessagesPuppeteer._syncChat (file:///opt/synapse/bridges/matrix-puppeteer-line/puppet/src/puppet.js:1185:32)
    at async MessagesPuppeteer._cycleChatUnsafe (file:///opt/synapse/bridges/matrix-puppeteer-line/puppet/src/puppet.js:609:4)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2376016) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise whi>
(node:2376016) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exi>

Also the memory usage somehow sky-rockets to 5.1G and there are excessive number of workers.

Another similar issue: ``` (node:2376016) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read property 'childElementCount' of null at MautrixController.parseReceiptList (./src/contentscript.js:745:81) at __puppeteer_evaluation_script__:1:51 at ExecutionContext._evaluateInternal (/opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async ExecutionContext.evaluate (/opt/synapse/bridges/matrix-puppeteer-line/puppet/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16) at async MessagesPuppeteer._getMessagesUnsafe (file:///opt/synapse/bridges/matrix-puppeteer-line/puppet/src/puppet.js:1060:20) at async MessagesPuppeteer._syncChat (file:///opt/synapse/bridges/matrix-puppeteer-line/puppet/src/puppet.js:1185:32) at async MessagesPuppeteer._cycleChatUnsafe (file:///opt/synapse/bridges/matrix-puppeteer-line/puppet/src/puppet.js:609:4) (Use `node --trace-warnings ...` to show where the warning was created) (node:2376016) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise whi> (node:2376016) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exi> ``` Also the memory usage somehow sky-rockets to `5.1G` and there are excessive number of workers.

@lecris i can reproduce the two cases.

case 1

[Fri Jun 17 2022 11:46:44 GMT+0800 ()][Puppeteer/@yourdomain.com] Waiting for login response
[Fri Jun 17 2022 11:48:27 GMT+0800 ()][API/@yourdomain.com/0] Received request 6 with command cancel_login
[Fri Jun 17 2022 11:48:28 GMT+0800 ()][Puppeteer/@yourdomain.com] Login failure: cancelled
[Fri Jun 17 2022 11:48:28 GMT+0800 ()][API/@yourdomain.com/0] Sending login failure to client
[Fri Jun 17 2022 11:48:57 GMT+0800 ()][API/@yourdomain.com/0] Error handling request 6 TimeoutError: Navigation timeout of 30000 ms exceeded
    at \\\matrix-puppeteer-line\puppet\node_modules\puppeteer\lib\cjs\puppeteer\common\LifecycleWatcher.js:106:111
    at async FrameManager.waitForFrameNavigation (\\\matrix-puppeteer-line\puppet\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:127:23)
    at async Frame.waitForNavigation (\\\matrix-puppeteer-line\puppet\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:440:16)
    at async Page.waitForNavigation (\\\matrix-puppeteer-line\puppet\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:829:16)
    at async Promise.all (index 0)
    at async Page.reload (\\\matrix-puppeteer-line\puppet\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:822:24)
    at async MessagesPuppeteer._preparePage (file://////matrix-puppeteer-line/puppet/src/puppet.js:183:4)
    at async MessagesPuppeteer.cancelLogin (file://////matrix-puppeteer-line/puppet/src/puppet.js:377:4)
    at async Client.handleLine (file://////matrix-puppeteer-line/puppet/src/client.js:278:20)

because of different reasons result in the two cases you mentioned.

reproducing steps

  1. simulating a long time to login (more than 4 second)
  2. sent cancel command
@lecris i can reproduce the two cases. case 1 ``` [Fri Jun 17 2022 11:46:44 GMT+0800 ()][Puppeteer/@yourdomain.com] Waiting for login response [Fri Jun 17 2022 11:48:27 GMT+0800 ()][API/@yourdomain.com/0] Received request 6 with command cancel_login [Fri Jun 17 2022 11:48:28 GMT+0800 ()][Puppeteer/@yourdomain.com] Login failure: cancelled [Fri Jun 17 2022 11:48:28 GMT+0800 ()][API/@yourdomain.com/0] Sending login failure to client [Fri Jun 17 2022 11:48:57 GMT+0800 ()][API/@yourdomain.com/0] Error handling request 6 TimeoutError: Navigation timeout of 30000 ms exceeded at \\\matrix-puppeteer-line\puppet\node_modules\puppeteer\lib\cjs\puppeteer\common\LifecycleWatcher.js:106:111 at async FrameManager.waitForFrameNavigation (\\\matrix-puppeteer-line\puppet\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:127:23) at async Frame.waitForNavigation (\\\matrix-puppeteer-line\puppet\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:440:16) at async Page.waitForNavigation (\\\matrix-puppeteer-line\puppet\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:829:16) at async Promise.all (index 0) at async Page.reload (\\\matrix-puppeteer-line\puppet\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:822:24) at async MessagesPuppeteer._preparePage (file://////matrix-puppeteer-line/puppet/src/puppet.js:183:4) at async MessagesPuppeteer.cancelLogin (file://////matrix-puppeteer-line/puppet/src/puppet.js:377:4) at async Client.handleLine (file://////matrix-puppeteer-line/puppet/src/client.js:278:20) ``` because of different reasons result in the two cases you mentioned. reproducing steps 1. simulating a long time to login (more than 4 second) 2. sent cancel command

Also the memory usage somehow sky-rockets to 5.1G and there are excessive number of workers.

I have the same problem, i found

the issue link
https://github.com/matrix-org/synapse/issues/12071

solutions

https://github.com/matrix-org/synapse/issues/12071#issuecomment-1050190027

https://github.com/matrix-org/synapse/issues/12515#issuecomment-1121680322

many api _matrix/client/r0/sync requests caused high io and cpu usage

> Also the memory usage somehow sky-rockets to 5.1G and there are excessive number of workers. I have the same problem, i found the issue link https://github.com/matrix-org/synapse/issues/12071 solutions https://github.com/matrix-org/synapse/issues/12071#issuecomment-1050190027 https://github.com/matrix-org/synapse/issues/12515#issuecomment-1121680322 many api _matrix/client/r0/sync requests caused high io and cpu usage
Author
Contributor

I remember this one not happening last time I ran, but I haven't run the bridge for half a year. I think it was a coding issue on the bridge rather than synapse

I remember this one not happening last time I ran, but I haven't run the bridge for half a year. I think it was a coding issue on the bridge rather than synapse
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: fair/matrix-puppeteer-line#33
No description provided.