You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/async/test_fetch_global.py::test_should_json_stringify_body_when_content_type_is_application_json[chromium-serialization2] (node:21485) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 lookup listeners added to [Socket]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at _addListener (node:events:593:17)
at Socket.addListener (node:events:611:10)
at Readable.on (node:internal/streams/readable:1126:35)
at ClientRequest.<anonymous> (/Users/maxschmitt/Developer/playwright-python/playwright/driver/package/lib/server/fetch.js:396:16)
at ClientRequest.emit (node:events:531:35)
at tickOnSocket (node:_http_client:850:7)
at onSocketNT (node:_http_client:913:5)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
(node:21485) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 secureConnect listeners added to [Socket]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at _addListener (node:events:593:17)
at Socket.addListener (node:events:611:10)
at Readable.on (node:internal/streams/readable:1126:35)
at ClientRequest.<anonymous> (/Users/maxschmitt/Developer/playwright-python/playwright/driver/package/lib/server/fetch.js:402:16)
at ClientRequest.emit (node:events:531:35)
at tickOnSocket (node:_http_client:850:7)
at onSocketNT (node:_http_client:913:5)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
When running the Python fetch tests: pytest --browser chromium tests/async/test_fetch_browser_context.py tests/async/test_fetch_global.py
Closes#32951
`node:http` reuses TCP Sockets under the hood. We weren't cleaning up
our listeners, leading to the `MaxListenersExceededWarning`.
This PR adds cleanup logic. It also raises the warning threshhold, so
that it doesn't trigger until there's 100 concurrent requests over the
same socket.
Closes#32951
`node:http` reuses TCP Sockets under the hood. We weren't cleaning up
our listeners, leading to the `MaxListenersExceededWarning`.
This PR adds cleanup logic. It also raises the warning threshhold, so
that it doesn't trigger until there's 100 concurrent requests over the
same socket.
I've used microsoft/playwright-python#2584 to test 1.49.0-alpha-2024-10-07 vs 1.49.0-alpha-2024-10-08, which contains #32956. The test confirmed that it fixes the MaxListenersExceededWarning.
When running the Python fetch tests:
pytest --browser chromium tests/async/test_fetch_browser_context.py tests/async/test_fetch_global.py
Leaks here:
The text was updated successfully, but these errors were encountered: