Booking Scraper avatar

Booking Scraper

Try for free

Pay $5.00 for 1,000 results

View all Actors
Booking Scraper

Booking Scraper

voyager/booking-scraper
Try for free

Pay $5.00 for 1,000 results

Scrape Booking with this hotels scraper and get data about accommodation on Booking.com. You can crawl by keywords or URLs for hotel prices, ratings, addresses, number of reviews, stars. You can also download all that room and hotel data from Booking.com with a few clicks: CSV, JSON, HTML, and Excel

Do you want to learn more about this Actor?

Get a demo
JN

actor-memory-limit-exceeded

Closed

jankucera opened this issue
9 days ago

Hi, we had an instance of this actor run that is showing as successful, but through API we received following error. Would you be able to explain why and how can we prevent this? "name":"ApifyApiError","clientMethod":"ActorClient.start","statusCode":402,"type":"actor-memory-limit-exceeded","attempt":1,"httpMethod":"post","path":"/v2/acts/PbMHke3jW25J6hSOA/runs","originalStack":"\n at makeRequest (/function/node_modules/apify-client/dist/http_client.js:184:30)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async ActorClient.start (/function/node_modules/apify-client/dist/resource_clients/actor.js:86:26)\n at async ActorClient.call (/function/node_modules/apify-client/dist/resource_clients/actor.js:107:24)\n at async syncReviews (/function/bookingScrapper.js:173:21)\n at async /function/func.js:101:42\n at async Promise.all (index 0)\n at async reviewsScrapping (/function/func.js:126:13)"}

lukas.prusa avatar

Hi, thanks for opening this issue!

Looks like you've hit the maximum concurrent memory limit for your account. In your case, that is 32 GB of total concurrent memory usage. This is just something that you have to handle at your backend, to limit the concurrency of your runs. Are you sure the run succeeded? It shouldn't have even started if you ran out of memory.

I recommend checking out a library called p-limit, which is very easy to set up, limiting the concurrency as desired. It should fit your code even more, as I can see from your error stack, that you are using Promise.all, which works perfectly with this library :)

I hope this helps, thanks!

Developer
Maintained by Apify
Actor metrics
  • 144 monthly users
  • 27 stars
  • 99.7% runs succeeded
  • 2.2 days response time
  • Created in Aug 2023
  • Modified 13 days ago
Categories