gRPC StatusCode.RESOURCE_EXHAUSTED

Hi all,

i have problem with running playwright (browser) tests against the selenium-grid4

From time to time, I have to wait for request to be finished and it takes about 1.5min - 2min,

So I’m using Wait For Element State <element> detached 2min
But there is about 50/50 chance, that I get: StatusCode.RESOURCE_EXHAUSTED

I found out that this resouce have limit of 4kb. It looks like, that this long sleeps can exceed this limit and it just kills chrome , and close playwright execution.

Is there any chance how to fix this, or increase this limit to handle this long waits?

Would it be possible to see full stack trace and also see playwright debug logs also, when the error happens.

I found it out. It was totally my fault.
I’m running tests agains selenium grid 4. So I have HUB + NODE…

BUT, when playwright/browser is run against that hub… the hub just ‘replies’ to playwraith that… here you are, here is the free node to run against… Playwright is then just connected to that node.

The problem is, that grid nor node does not know, that I’m running tests…

By default the session-timeout on the node is set to 300s… So the problem was that if tests lasts longer than 300s, chromeNode just kills the chrome browser, because it is ‘idle for 300s’ (even thou the tests are running). Afterwards, the ‘RESOURCE_EXHAUSTED’ error is raised.

So the solution was to just set session-timeout to 900s , that handles all the cases that can happen

It is kind of strange, but I found this as only solution

1 Like

Interesting, in Selenium side resource is also released explicitly. Perhaps this is something to report in Playwright side and hopefully enhance.