panic: Concurrency must be greater than 0 (docker)
- Tried to install it to a new system via docker compose
- past 2 months there wasn't a problem
- new system : alpine-docker lxc proxmox
- docker-compose.yml
services:
google-maps-scraper:
container_name: maps-scraper
command: '-data-folder /gmapsdata'
image: gosom/google-maps-scraper
ports:
- '5907:8080'
volumes:
#- './gmaps-data:/gmapsdata'
- '/root/google-maps:/gmapsdata'
restart: unless-stopped
environment:
- TZ=Australia/Sydney
- the error
╔══════════════════════════════════════════════════════════════════════════════╗
║ 🌍 Google Maps Scraper ║
║ ⭐ If you find this project useful, please star it on GitHub: https://github ║
║ .com/gosom/google-maps-scraper ║
║ 💖 Consider sponsoring to support development: https://github.com/sponsors/g ║
║ osom ║
╚══════════════════════════════════════════════════════════════════════════════╝
panic: Concurrency must be greater than 0
goroutine 1 [running]:
github.com/gosom/google-maps-scraper/runner.ParseConfig()
/app/runner/runner.go:154 +0xea5
main.main()
/app/main.go:35 +0x125
╔══════════════════════════════════════════════════════════════════════════════╗
║ 🌍 Google Maps Scraper ║
║ ⭐ If you find this project useful, please star it on GitHub: https://github ║
║ .com/gosom/google-maps-scraper ║
║ 💖 Consider sponsoring to support development: https://github.com/sponsors/g ║
║ osom ║
╚══════════════════════════════════════════════════════════════════════════════╝
panic: Concurrency must be greater than 0
goroutine 1 [running]:
github.com/gosom/google-maps-scraper/runner.ParseConfig()
/app/runner/runner.go:154 +0xea5
main.main()
/app/main.go:35 +0x125
╔══════════════════════════════════════════════════════════════════════════════╗
║ 🌍 Google Maps Scraper ║
║ ⭐ If you find this project useful, please star it on GitHub: https://github ║
║ .com/gosom/google-maps-scraper ║
║ 💖 Consider sponsoring to support development: https://github.com/sponsors/g ║
║ osom ║
╚══════════════════════════════════════════════════════════════════════════════╝
panic: Concurrency must be greater than 0
goroutine 1 [running]:
github.com/gosom/google-maps-scraper/runner.ParseConfig()
/app/runner/runner.go:154 +0xea5
main.main()
/app/main.go:35 +0x125
the concurrency by default is NumCPU/2. It looks like that in that system the NumCPU return 0.
I just released a new version 1.7.10 that uses go 1.24 and sets the concurrency to 1 if not specified or computed.
I recommed you get this version and also start the program using the -c argument and set it to your desired concurrency.
thanks, @gosom
i tried with new udpdate with the -c argument, getting this on logs flag needs an argument: -c
╔══════════════════════════════════════════════════════════════════════════════╗
║ 🌍 Google Maps Scraper ║
║ ⭐ If you find this project useful, please star it on GitHub: https://github ║
║ .com/gosom/google-maps-scraper ║
║ 💖 Consider sponsoring to support development: https://github.com/sponsors/g ║
║ osom ║
╚══════════════════════════════════════════════════════════════════════════════╝
flag needs an argument: -c
Usage of google-maps-scraper:
-addr string
address to listen on for web server (default ":8080")
-aws-access-key string
AWS access key
-aws-lambda
run as AWS Lambda function
-aws-lambda-chunk-size int
AWS Lambda chunk size (default 100)
-aws-lambda-invoker
run as AWS Lambda invoker
-aws-region string
AWS region
@huseyinkogo you need to add the number of CPUS.
so something like
-c 4
Have you used the flag properly?
Additionally, I don't see any reason that this won't work without this command line argument at all.