Skip to content

Commit

Permalink
chore: use handleRequestTimeoutMillis * 2 when computing internal t…
Browse files Browse the repository at this point in the history
…imeout value

Related: #1324
  • Loading branch information
B4nan committed Apr 7, 2022
1 parent 2b81ef5 commit 4f54355
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crawlers/basic_crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export class BasicCrawler {
this.handleRequestTimeoutMillis = handleRequestTimeoutSecs * 1000;
const tryEnv = (val) => (val == null ? val : +val);
// allow at least 5min for internal timeouts
this.internalTimeoutMillis = tryEnv(process.env.APIFY_INTERNAL_TIMEOUT) ?? Math.max(this.handleRequestTimeoutMillis, 300e3);
this.internalTimeoutMillis = tryEnv(process.env.APIFY_INTERNAL_TIMEOUT) ?? Math.max(this.handleRequestTimeoutMillis * 2, 300e3);
// override the default internal timeout of request queue to respect `handleRequestTimeoutMillis`
if (this.requestQueue) {
this.requestQueue.internalTimeoutMillis = this.internalTimeoutMillis;
Expand Down

0 comments on commit 4f54355

Please sign in to comment.