Closed rubydev closed 2 years ago
Can you please test this with latest versions? browser-pool 2.0.2 has a fix for race condition in the newPage
method, so it might be very well already fixed.
cc @szmarczak
@B4nan This is very different. The race condition I fixed was causing too many tabs open than max allowed.
It looks like it failed to generate the port or couldn't find one open. Are you able to reproduce the issue?
Hi, I’m not able reproduce the issue again - it happened only once. I will let you know, if it will happen again.
This is definitely port exhaustion. I'm getting the same error via:
const http = require('http');
const listen = () => {
http.createServer().listen(0, listen);
};
listen();
Error: listen EADDRINUSE: address already in use ::
at Server.setupListenHandle [as _listen2] (node:net:1319:16)
at listenInCluster (node:net:1367:12)
at Server.listen (node:net:1454:7)
at Server.listen (/home/szm/Desktop/proxy-chain/ex.js:4:25)
at Object.onceWrapper (node:events:513:28)
at Server.emit (node:events:394:28)
at emitListeningNT (node:net:1353:10)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net:1346:8)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'EADDRINUSE',
errno: -98,
syscall: 'listen',
address: '::'
}
@szmarczak Week ago it happened again. And before it happened, in log was a lot errors like this:
Can't it be related with this? https://github.com/apify/browser-pool/issues/32
This should be fixed now.
When we kicked off multiple runs on Apify platform, two actors threw same exception in similar time (and main function of actor failed). Both runs contained same IP address and port in log file. Session ID was different.
node: 14 apify SDK: 1.3.4 browser-pool: 1.2.0-beta.1 puppeteer: 10.2.0