jef / streetmerchant

🤖 The world's easiest, most powerful stock checker
https://jef.buzz/streetmerchant
MIT License
4.97k stars 1.3k forks source link

Navigation timeout on Pi 4 Model B #1577

Closed Lars4k closed 3 years ago

Lars4k commented 3 years ago

Expected Behavior

There should be no navigation timeout. Under windows 10 I do not have any navigation timeouts. Under windows 10 without problems: Screen

Current Behavior

I get an extraordinary number of navigation timeouts on the Raspberry Pi 4 Model B. Screen

Steps to Reproduce

  1. Fresh install of Raspberry Pi 4 Model B 8 GB RAM
  2. Install Nodejs 15
  3. install Streetmerchant git
  4. export PUPPETEER_EXECUTABLE_PATH='/usr/bin/chromium-browser'
  5. export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
  6. npm run start

Environment

OS: Newest Raspberry PI Desktop version

# ** All configuration variables are optional **
# Copy this file and name it as `dotenv` (without backticks)
# Read https://jef.codes/streetmerchant/getting-started/#customization for help on customizing this file
########################################################################################################

ASCII_BANNER=
ASCII_COLOR=
AUTO_ADD_TO_CART=
BROWSER_TRUSTED=
COUNTRY=
DESKTOP_NOTIFICATIONS=
DISCORD_NOTIFY_GROUP=
DISCORD_NOTIFY_GROUP_3060TI=
DISCORD_NOTIFY_GROUP_3070=
DISCORD_NOTIFY_GROUP_3080=
DISCORD_NOTIFY_GROUP_3090=
DISCORD_NOTIFY_GROUP_CORSAIR_SF=
DISCORD_NOTIFY_GROUP_RX6800=
DISCORD_NOTIFY_GROUP_RX6800XT=
DISCORD_NOTIFY_GROUP_RX6900XT=
DISCORD_NOTIFY_GROUP_RYZEN5600=
DISCORD_NOTIFY_GROUP_RYZEN5800=
DISCORD_NOTIFY_GROUP_RYZEN5900=
DISCORD_NOTIFY_GROUP_RYZEN5950=
DISCORD_NOTIFY_GROUP_SONYPS5C=
DISCORD_NOTIFY_GROUP_SONYPS5DE=
DISCORD_NOTIFY_GROUP_XBOXSX=
DISCORD_NOTIFY_GROUP_XBOXSS=
DISCORD_NOTIFY_GROUP_TEST=
DISCORD_WEB_HOOK=
EMAIL_PASSWORD=
EMAIL_TO=
EMAIL_USERNAME=
HEADLESS=
IN_STOCK_WAIT_TIME=
LOG_LEVEL=
LOW_BANDWIDTH=
MAX_PRICE_SERIES_3060TI=
MAX_PRICE_SERIES_3070=
MAX_PRICE_SERIES_3080=
MAX_PRICE_SERIES_3090=
MAX_PRICE_SERIES_CORSAIR_SF=
MAX_PRICE_SERIES_RX6800=
MAX_PRICE_SERIES_RX6800XT=
MAX_PRICE_SERIES_RX6900XT=
MAX_PRICE_SERIES_RYZEN5600=
MAX_PRICE_SERIES_RYZEN5800=
MAX_PRICE_SERIES_RYZEN5900=
MAX_PRICE_SERIES_RYZEN5950=
MAX_PRICE_SERIES_SONYPS5C=
MAX_PRICE_SERIES_SONYPS5DE=
MAX_PRICE_SERIES_XBOXSS=
MAX_PRICE_SERIES_XBOXSX=
MAX_PRICE_SERIES_TEST=
MICROCENTER_LOCATION=
MQTT_BROKER_ADDRESS=
MQTT_BROKER_PORT=
MQTT_CLIENT_ID=
MQTT_PASSWORD=
MQTT_QOS=
MQTT_TOPIC=
MQTT_USERNAME=
NVIDIA_ADD_TO_CART_ATTEMPTS=
NVIDIA_SESSION_TTL=
OPEN_BROWSER=false
PAGE_BACKOFF_MIN=30000
PAGE_BACKOFF_MAX=600000
PAGE_SLEEP_MIN=
PAGE_SLEEP_MAX=
PAGE_TIMEOUT=100000
PAGERDUTY_INTEGRATION_KEY=
PAGERDUTY_SEVERITY=
PHONE_CARRIER=
PHONE_NUMBER=
PLAY_SOUND=
PROXY_ADDRESS=
PROXY_PROTOCOL=
PROXY_PORT=
PUSHBULLET=
PUSHOVER_EXPIRE=
PUSHOVER_RETRY=
PUSHOVER_TOKEN=
PUSHOVER_USER=
PUSHOVER_PRIORITY=
SCREENSHOT=
SHOW_ONLY_BRANDS=
SHOW_ONLY_MODELS=tuf oc,ps5 console,ps5 digital,xbox series x
SHOW_ONLY_SERIES=3080, 3090, sonyps5c, sonyps5de, xboxsx
SLACK_CHANNEL=
SLACK_TOKEN=
SMTP_ADDRESS=
SMTP_PORT=
STORES=amazon-de:50000:80000,alternate:50000:80000,amazon-de-warehouse:50000:80000,amd-de:30000:80000,asus-de:50000:80000,caseking:100000:150000,mediamarkt:100000:300000,medimax:50000:80000,mindfactory:50000:80000,otto:50000:80000,pcking:50000:80000,saturn:100000:300000
WEB_PORT=

Logs

wofnull commented 3 years ago

Same as in #1520 :

Please bear in mind that the script itself spawns alot of Chromium Browsers / Tabs and that if you try to track many Items ( like in your case ) on many sites, the script tends to consume alot of Memory and even more CPU ressources, you can check this by opening an additional SSH Connection or terminal on the Raspberry PI and check htop ... there you will see that the system is highly under load. Which causes the script to run into the timeouts.

to bring a hint in the problematic: On a ryzen 1800x ( 8 Cores / 16 Threads / 4 GHz ) and 32 GB of RAM , the system usage of this script is around 20-50% percent from time to time. The system is based on Debian 9.5.

However you can try to mitigate this ( or switch to a real computer with enough compute power ) :

wofnull commented 3 years ago

Furthermore ( Slight Suggestion ) as you are tracking 3080 / 3090 cards in germany: set a max Price for the items you want to track, background is that most german stores are listing stock on a few of your choosen products for the last few days but wiht prices around 60 - 100% over the MSRP ... this can reduce false positive Stock replies and alerts , when you get the script to run ;)

nmcc1212 commented 3 years ago

also to check if this is an issue you could ssh into the pi and run htop or install netdata.

This will allow you to view your cpu/ram usage

I like to use netdata to monitor my pi through the web ui (https://github.com/netdata/netdata)

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] commented 3 years ago

This issue has been closed because it is stale. Reopen if necessary.