Skip to content

Reconsider how to apply timeouts in Crawler #1596

Open

Description

@Pijukatel

Just a draft proposal based on review discussion.

Timeouts could be fixed to a CrawlingContext instance and consumers (pipeline steps) of the context could access them to select appropriate timeout, apply it, or even modify the timeout of the following pipeline steps.

Initial context could be created like this:

pipeline_timeout = SharedTimeout(...)

BasicCrawlingContext(.....,
 timeouts={
"WholePipeline": pipeline_timeout, 
"Navigation": pipeline_timeout.limited_to(NAVIGATION_LIMIT),
"RequestHandler": pipeline_timeout.limited_to(HANDLER_LIMIT)
})

Specialized crawlers (ParselCrawler, PlaywrightCrawler...) could easily add new entries to context.timeouts if needed,

Based on the discussion related to timeout change: #1474 (comment)

Activity

  1. added
    t-tooling
    solutioning
    on Dec 4, 2025
  2. Pijukatel commented on Dec 9, 2025

    @Pijukatel
    ContributorAuthor

    This could enable functionality already requested in the past: github.com/apify/crawlee-python/issues/1596

  3. halvko commented on Dec 9, 2025

    @halvko

    We are doing some request handlers where we are spawning a different actor and polling for when it’s done. These may take quite a bit of time and it is (opposed to other handlers in the actor) not a sign of an issue if it takes a while to complete. For that it would be nice to be able to turn off the timeout for just that handle.

  4. added this to the 2.0 milestone on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    solutioningt-tooling

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions