You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running the quickstart code in WSL2 on Windows 11. Crawlee is not using the full available memory in WSL2. I have 15Gi total memory in WSL2
$ free -mh
total used free shared buff/cache available
Mem: 15Gi 2.7Gi 8.9Gi 3.0Mi 3.9Gi 12Gi
Swap: 4.0Gi 0B 4.0Gi
Crawlee is only using 3.88GB for some reason.
[crawlee._autoscaling.snapshotter] WARN Memory is critically overloaded. Using 5.24 GB of 3.88 GB (135%). Consider increasing available memory.
How can I make Crawlee use a larger percentage of available memory?
Code (same code as the quickstart):
importasynciofromcrawlee.playwright_crawlerimportPlaywrightCrawler, PlaywrightCrawlingContextasyncdefmain() ->None:
# PlaywrightCrawler crawls the web using a headless browser controlled by the Playwright library.crawler=PlaywrightCrawler()
# Define a request handler to process each crawled page and attach it to the crawler using a decorator.@crawler.router.default_handlerasyncdefrequest_handler(context: PlaywrightCrawlingContext) ->None:
# Extract relevant data from the page context.data= {
'url': context.request.url,
'title': awaitcontext.page.title(),
}
# Store the extracted data.awaitcontext.push_data(data)
# Extract links from the current page and add them to the crawling queue.awaitcontext.enqueue_links()
# Add first URL to the queue and start the crawl.awaitcrawler.run(['https://crawlee.dev'])
if__name__=='__main__':
asyncio.run(main())
Activity