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

458
Views
Error: Got unexpected extra arguments (workers=4 0.0.0.0)

I am trying to run fastapi with docker but i am getting this error Error: Got unexpected extra arguments (workers=4 0.0.0.0). I am running background tasks using BackgroundTask in fastapi so i need to add worker in CMD. but i am getting error when i do

Dockerfile

FROM tiangolo/uvicorn-gunicorn:python3.8-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
CMD ["uvicorn", "app.main:app", "--host","TIMEOUT=300","workers=4", "0.0.0.0", "--port", "80"]

gunicorn.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!