From da1098f38d7c5dcf8e9d944f9aa91e495046f978 Mon Sep 17 00:00:00 2001 From: Yanlong Wang Date: Wed, 7 May 2025 21:58:03 +0800 Subject: [PATCH] fix --- src/api/crawler.ts | 1 + src/stand-alone/crawl.ts | 4 ---- src/stand-alone/search.ts | 4 ---- src/stand-alone/serp.ts | 4 ---- 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/api/crawler.ts b/src/api/crawler.ts index 82f427c..c5679bc 100644 --- a/src/api/crawler.ts +++ b/src/api/crawler.ts @@ -340,6 +340,7 @@ export class CrawlerHost extends RPCHost { } } const crawlOpts = await this.configure(crawlerOptions); + this.logger.info(`Accepting request from ${uid || ctx.ip}`, { opts: crawlerOptions }); if (crawlerOptions.robotsTxt) { await this.robotsTxtService.assertAccessAllowed(targetUrl, crawlerOptions.robotsTxt); } diff --git a/src/stand-alone/crawl.ts b/src/stand-alone/crawl.ts index 4c0a2bb..4a6e84c 100644 --- a/src/stand-alone/crawl.ts +++ b/src/stand-alone/crawl.ts @@ -44,10 +44,6 @@ export class CrawlStandAloneServer extends KoaServer { const ar = new AsyncResource('HTTP2ServerRequest'); ar.runInAsyncScope(fn, this.koaApp, req, res); }); - // HTTP2 p2p may break the load balancing - this.httpServer.updateSettings({ - maxConcurrentStreams: 8, - }); // useResourceBasedDefaultTracker(); return this; diff --git a/src/stand-alone/search.ts b/src/stand-alone/search.ts index c2ec152..673a3cb 100644 --- a/src/stand-alone/search.ts +++ b/src/stand-alone/search.ts @@ -44,10 +44,6 @@ export class SearchStandAloneServer extends KoaServer { const ar = new AsyncResource('HTTP2ServerRequest'); ar.runInAsyncScope(fn, this.koaApp, req, res); }); - // HTTP2 p2p may break the load balancing - this.httpServer.updateSettings({ - maxConcurrentStreams: 8, - }); // useResourceBasedDefaultTracker(); return this; diff --git a/src/stand-alone/serp.ts b/src/stand-alone/serp.ts index 1691c4b..76c91fc 100644 --- a/src/stand-alone/serp.ts +++ b/src/stand-alone/serp.ts @@ -45,10 +45,6 @@ export class SERPStandAloneServer extends KoaServer { const ar = new AsyncResource('HTTP2ServerRequest'); ar.runInAsyncScope(fn, this.koaApp, req, res); }); - // HTTP2 p2p may break the load balancing - this.httpServer.updateSettings({ - maxConcurrentStreams: 50, - }); // useResourceBasedDefaultTracker(); return this;