mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 00:09:01 +08:00
Meaningful log message for high resource usage errors
This commit is contained in:
parent
c6cad942ab
commit
da6b7505f3
@ -156,7 +156,8 @@ const workerFun = async (queue: Queue, jobProcessor: (token: string, job: Job) =
|
|||||||
const canAcceptConnection = await monitor.acceptConnection();
|
const canAcceptConnection = await monitor.acceptConnection();
|
||||||
|
|
||||||
if (!canAcceptConnection) {
|
if (!canAcceptConnection) {
|
||||||
logger.info("Cant accept connection");
|
console.log("Can't accept connection due to RAM/CPU load");
|
||||||
|
logger.info("Can't accept connection due to RAM/CPU load");
|
||||||
cantAcceptConnectionCount++;
|
cantAcceptConnectionCount++;
|
||||||
|
|
||||||
if (cantAcceptConnectionCount >= 25) {
|
if (cantAcceptConnectionCount >= 25) {
|
||||||
|
@ -567,7 +567,8 @@ const workerFun = async (
|
|||||||
const token = uuidv4();
|
const token = uuidv4();
|
||||||
const canAcceptConnection = await monitor.acceptConnection();
|
const canAcceptConnection = await monitor.acceptConnection();
|
||||||
if (!canAcceptConnection) {
|
if (!canAcceptConnection) {
|
||||||
console.log("Cant accept connection");
|
console.log("Can't accept connection due to RAM/CPU load");
|
||||||
|
logger.info("Can't accept connection due to RAM/CPU load");
|
||||||
cantAcceptConnectionCount++;
|
cantAcceptConnectionCount++;
|
||||||
|
|
||||||
if (cantAcceptConnectionCount >= 25) {
|
if (cantAcceptConnectionCount >= 25) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user