Ne-Lexa / google-play-scraper

PHP scraper to get data from Google Play
MIT License
78 stars 38 forks source link

"Unable to read from stream" error in production #11

Closed noumanhabib closed 2 years ago

noumanhabib commented 3 years ago

I have a error when using google-play-scrapper in production. It work fine at localhost but not work in production. Below is screenshort of error. screencapture-digiplanet-org-admin-app-refresh-1-simple-2021-04-22-14_08_06

Stream object before causing error screenshort is also below. stream pic

I am using it in Laravel 8 Guzzlehttp: 6.5 PHP: 7.4 (at production)

Also each request fail after 20s and show read stream error as up. Is there any connection timeout set for 20s?

Ne-Lexa commented 2 years ago

Try installing ext-curl if it is not installed.
There are methods to increase the timeout.

$gplay
    ->setConnectTimeout(60)
    ->setTimeout(60);
noumanhabib commented 2 years ago

Yes it is connection timeout error. You can set a higher value then it work.