Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

262
Views
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3> error while running fastapi in docker

I have added fastapi to a docker container which does background tasks using BackgroundTask from fastapi. When i run the container the page is not loading and i have seen this error in docker desktop logs gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>. I am using docker run -d --name mycontainer -p 8080:8080 onetest to run the container.

entrypoint.sh

#!/bin/bash
gunicorn --worker-tmp-dir /dev/shm --config gunicorn.config.py app.main:app

docker file

FROM python:3.9-slim
COPY ./requirements.txt ./requirements.txt
RUN pip3 install --no-cache-dir --upgrade -r ./requirements.txt
COPY ./app ./app
COPY ./inputs ./inputs
COPY ./model ./model
COPY ./tests ./tests
COPY ./gunicorn.config.py ./gunicorn.config.py
COPY ./Procfile ./Procfile
COPY entrypoint.sh .
EXPOSE 8080
RUN chmod +x entrypoint.sh
CMD [ "./entrypoint.sh" ]

docker_config.py

bind = "0.0.0.0:8080"
workers = 4
timeout = 300
# Using Uvicorn's Gunicorn worker class
worker_class = "uvicorn.workers.UvicornWorker"
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!