Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource temporarily unavailable - ./node_modules/.bin/playwright run-driver #105

Closed
goldenking0412 opened this issue Jun 9, 2021 · 5 comments
Labels
question Further information is requested

Comments

@goldenking0412
Copy link

I am running playwright scraper in windows. About 5 scraping requests at once.
Did npm install playwright to install playwright in windows

And it works at first.
But after a few mins or few requests, I am getting error
Resource temporarily unavailable - ./node_modules/.bin/playwright run-driver

Can you please check what's wrong with this?

@YusukeIwaki
Copy link
Owner

Could you share the summary of the scraping code?
I guess Playwright.create is repeatedly called and the Windows process limit is exceeded, but I can't check it in detail without how Playwright is used in your code.

@goldenking0412
Copy link
Author

Can you please give me your email?
I dont want to reveal the code to everyone.
Would like to give code via email

@goldenking0412
Copy link
Author

And also I have a question, How can I use chrome extension? I can not find document in this gem

@YusukeIwaki YusukeIwaki changed the title Resource unavailable Resource temporarily unavailable - ./node_modules/.bin/playwright run-driver Jun 11, 2021
@YusukeIwaki YusukeIwaki added the question Further information is requested label Jun 11, 2021
@YusukeIwaki
Copy link
Owner

The error doesn't occur if Playwright.create is called with block or properly used with PlaywrightExecution#stop
Too many Playwright sessions are generated for causing the error.

@goldenking0412
Copy link
Author

goldenking0412 commented Jun 11, 2021

@YusukeIwaki

    Playwright.create(playwright_cli_executable_path: './node_modules/.bin/playwright') do |playwright|
      playwright.chromium.launch(headless: false) do |browser|
        page = browser.new_page

        page.goto url
        
        scrape page
      end
    end

Here's summary code.
Do I need to add begin...rescue there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants