Closed mschaefer-gresham closed 3 days ago
The error "Process unexpectedly closed with status signal" when generating thumbnails in Superset within a Docker Compose environment is likely due to insufficient memory allocation for the superset-worker
service.
To resolve this, you can increase the memory limit for the superset-worker
service by uncommenting and adjusting the mem_limit
and mem_reservation
settings in your docker-compose.yml
file. Here is the relevant section with the memory settings uncommented:
superset-worker:
build:
<<: *common-build
container_name: superset_worker
command: ["/app/docker/docker-bootstrap.sh", "worker"]
env_file:
- path: docker/.env # default
required: true
- path: docker/.env-local # optional override
required: false
environment:
CELERYD_CONCURRENCY: 2
restart: unless-stopped
depends_on: *superset-depends-on
user: *superset-user
volumes: *superset-volumes
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD-SHELL", "celery -A superset.tasks.celery_app:app inspect ping -d celery@$$HOSTNAME"]
# Bump memory limit if processing selenium / thumbnails on superset-worker
mem_limit: 2038m
mem_reservation: 128M
By increasing the memory limit, you can help ensure that the superset-worker
has enough resources to process thumbnails without running into memory-related issues [1].
To continue talking to Dosu, mention @dosu.
@dosu this did not solve the issue.
If increasing the memory limit did not resolve the issue, there are a few other configurations to check:
Redis Configuration: Ensure that the Redis service is running and accessible by the superset-worker
. Verify that the REDIS_HOST
and REDIS_PORT
environment variables are correctly set.
Celery Configuration: Ensure that Celery is properly configured and running. The health check command for Celery should return a successful response.
Selenium Configuration: Ensure that Selenium is properly configured and accessible. This includes setting the WEBDRIVER_BASEURL
in the superset_config.py
:
WEBDRIVER_BASEURL = "http://superset:8088/" # When using docker compose baseurl should be http://superset_app:8088/
Headless Browser Installation: Ensure that a headless browser (Firefox or Chrome) is installed in the superset-worker
container. If using Chrome, set the WEBDRIVER_TYPE
to "chrome"
in your superset_config.py
:
WEBDRIVER_TYPE = "chrome"
WEBDRIVER_OPTION_ARGS = [
"--force-device-scale-factor=2.0",
"--high-dpi-support=2.0",
"--headless",
"--disable-gpu",
"--disable-dev-shm-usage",
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-extensions",
]
Logs: Check the logs of the superset-worker
container for any errors or warnings that might indicate what is going wrong.
Ensure that all these configurations are correctly set and that all dependencies are running as expected [1][2].
To continue talking to Dosu, mention @dosu.
@duso
WEBDRIVER_OPTION_ARGS = [
"--force-device-scale-factor=2.0",
"--high-dpi-support=2.0",
"--headless",
"--disable-gpu",
"--disable-dev-shm-usage",
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-extensions",
]
After much digging around and trying chrome, I suspect the issue is that I'm running docker compose on a Mac M3. It appears the chromedriver and firefox executables won't run on M series.
docker exec -it superset_worker bash
root@413ee2048953:/app# cd /usr/local/bin
root@413ee2048953:/usr/local/bin# chromedriver
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
Trace/breakpoint trap
root@413ee2048953:/usr/local/bin# firefox
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
Trace/breakpoint trap
Can someone confirm? And is there a workaround?
This was caused due to running docker compose on Mac M3. chrome and firefix executables won't run on Apple Silicon Macs. When running on an Intel Mac it started working.
Interesting, thank you @mschaefer-gresham for diagnosing the problem and reporting back!
Bug description
I've enabled thumbnails within the docker compose environment and I am getting this error repeating in the log on startup.
What am I missing?
How to reproduce the bug
Enable thumbnails feature flag.
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
18 or greater
Browser
Chrome
Additional context
No response
Checklist