EricJMarti / inventory-hunter

⚡️ Get notified as soon as your next CPU, GPU, or game console is in stock
MIT License
1.12k stars 263 forks source link

Fixes for common issues #124

Open tushdante opened 3 years ago

tushdante commented 3 years ago

Hey all,

Leaving some feedback here from some learnings I've had deploying to azure and playing around with the configs. Along with the fix for an error I've seen reported a few times (e.g., #120)

  1. It's helpful to break out your config files by domain. So, I'm searching for a GTX3080 across newegg, bestbuy, amazon, etc. in which case I've got a separate config for each one (like gtx3080_newegg, gtx3080_bestbuy, etc.). I noticed that trying to dump all URLs into a single file would often cause the chromium driver to crash.
  2. I added self.options.add_argument('--disable-dev-shm-usage') to the src/driver.py file which fixed the other issue I kept seeing (#120)
  3. Adding a docker-compose.yml file helped as well, so I can manage all my alerters easily. See example below:
3080_misc:
    extends:
      file: docker-compose-common.yaml
      service: inventory_hunter
    volumes:
      - ./data/3080_misc:/data
      - ./log/3080_misc.txt:/log.txt
      - ./config/gtx3080_misc.yaml:/config.yaml
      - ./config/alerters.yaml:/alerters.yaml
    command: --alerter email --alerter-config /alerters.yaml

where docker-compose-common.yaml is

version: "3"
services:
  inventory_hunter:
    build: .

If anyone has any suggestions to improve on my own solution I'd love to hear em. Also, huge thanks to the maintainer for setting this up!

Happy hunting everyone!

faxd commented 3 years ago

What line in src/driver.py did you add self.options.add_argument('--disable-dev-shm-usage') to?

tushdante commented 3 years ago

Added it to line 73 (after the self.options.add_argument('--window-size=1920,1080') ) argument

bluecow82 commented 3 years ago

Thank you for posting!

I was so happy to see a fix for the Chromium issue. Unfortunately, it hasn't worked for me on the Pi 4. Even more annoyingly, the Chromium issue seems to exponentially increase disk usage as it runs.

tushdante commented 3 years ago

Oh that's unfortunate. Have you tried splitting your config up by domain?

bluecow82 commented 3 years ago

Oh that's unfortunate. Have you tried splitting your config up by domain?

if you mean between Best Buy and NewEgg for example, yes, I have separate files/images running for each. The ones searching on NewEgg and Microcenter are working flawlessly, while Amazon and BestBuy are giving me the Chromium error.

bxcimu commented 3 years ago

Oh that's unfortunate. Have you tried splitting your config up by domain?

if you mean between Best Buy and NewEgg for example, yes, I have separate files/images running for each. The ones searching on NewEgg and Microcenter are working flawlessly, while Amazon and BestBuy are giving me the Chromium error.

Have you found a solution for this? I'm running a 20.04 on a VM and I am getting a chromium error (only on amazon and bestbuy) and my disk fills up to 100%

bluecow82 commented 3 years ago

Oh that's unfortunate. Have you tried splitting your config up by domain?

if you mean between Best Buy and NewEgg for example, yes, I have separate files/images running for each. The ones searching on NewEgg and Microcenter are working flawlessly, while Amazon and BestBuy are giving me the Chromium error.

Have you found a solution for this? I'm running a 20.04 on a VM and I am getting a chromium error (only on amazon and bestbuy) and my disk fills up to 100%

I found a workaround. Check out #127