Skip to main content

All Questions

Tagged with
0 votes
0 answers
43 views

Read timeout unexpected behavior

I am migrating my an API microservice and among the changes I have switched Flask with FastAPI. I have measured and tested and it seems that every route of my application is faster on the new ...
Yuval Cohn's user avatar
0 votes
0 answers
27 views

How to update ML model that was preloaded in Gunicorn

Below is a simple example of serving ML-model with FastAPI. I want to run my gunicorn server like this: gunicorn --workers=4 --preload app.main:app --worker-class uvicorn.workers.UvicornWorker --...
mehekek's user avatar
  • 349
0 votes
0 answers
52 views

Proper shm_size for a Docker container that will spawn multiple Google Chrome browsers

Currently, I´m working on a FastAPI app running via Uvicorn inside a Docker container. The app internally scrapes data from a website (let´s say similar to Wikipedia for the sake of the example) using ...
sescobar's user avatar
0 votes
0 answers
27 views

If I update the dependencies to the latest, I cannot see the traces

I am having a FastAPI (0.95.9) application. Using gunicorn with uvicorn.workers.UvicornWorker workers. I am trying to auto-instrument it and pass data to a self-hosted Signoz platform. When the ...
user2465039's user avatar
2 votes
1 answer
105 views

FastAPI lifespan event download model across multple gunicorn workers

I want to load a ML model to a local folder. However, I'm using gunicorn with multiple workers, so on startup each of them downloads the model: from contextlib import asynccontextmanager from fastapi ...
Jankapunkt's user avatar
  • 8,343
0 votes
1 answer
94 views

FastAPI gunicorn concurrent process worker behaving strange

I have a sample fastAPI code as follows.I have noticed that the requests to my server are not handled properly by gunicorn workers. I have 8 workers available via gunicorn command. I tested with 6 ...
Arjun Gamer's user avatar
0 votes
1 answer
2k views

Issues with FastAPI Uvicorn workers | Only one worker is handling the request

I have a sample FastAPI application, with a single endpoint which returns the result a after a delay of 5 seconds. Please find the code below. from fastapi import FastAPI import uvicorn, os, time app =...
Nandha's user avatar
  • 21
1 vote
0 answers
71 views

FastAPI fails spinning up worker

I am running FastAPI inside a docker container on my deployment VM. The image tests well on my develop OSX + Docker. Now, running it on the target machine it fails with the issue below. It says max ...
El Dude's user avatar
  • 5,584
0 votes
0 answers
153 views

Error is not being caught by FastAPI or Gunicorn

I'm currently getting a 502 error from my FastAPI app after making concurrent requests to the endpoints, which are calling OpenAI endpoints. The problem is, that I can't see the errors in the logs, ...
monopoly's user avatar
  • 554
0 votes
0 answers
33 views

FastAPI backend is somehow stuck [duplicate]

I have a backend server which is a FastAPI server deployed with Gunicorn and Uvicorn worker class. Sometimes the server stops giving the response right away. I've checked the CPU and RAM usage all ...
codvlpr's user avatar
  • 122
1 vote
1 answer
565 views

Unable to run uvicorn under gunicorn in a Docker container

The following Dockerfile builds a working Fastapi demo app running under a single instance of uvicorn: # example of a multistage build # Stage 1: Builder # Use the official larger Docker Python image ...
Robert Alexander's user avatar
0 votes
0 answers
59 views

Gunicorn with sync workers and async endpoint [duplicate]

When we create a gunicorn using 2 workers and concurrently hit 20 requests then up to certain time requests are executed on different workers but then the requests start executing on the same worker ...
Rishu Tyagi's user avatar
1 vote
0 answers
953 views

Gunicorn with 1 Worker works faster that Uvicorn for FastAPI app on single-core k8s Pod

I run my FastAPI application (Python 3.11.5) through the Gunicorn with 1 worker, using UvicornWorker class. My Deployment in k8s contains 2 Pods with only 1 CPU-core for each. I thought about using ...
Alex's user avatar
  • 21
0 votes
1 answer
404 views

ChromaDB index update using gunicorn multiple uviworkers on macos throws YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__ error

I have created a simple FastAPI app for updating/uploading documents to ChromaDB Vectorstore on Mac OSX in-order to do a simple query search. Here is the below code, import asyncio from fastapi ...
Avinash Raj's user avatar
0 votes
1 answer
406 views

How to log to StatsD using FastAPI and Gunicorn

I have a FastAPI that I am serving up using gunicorn. I am trying to send statistics to a DataDog agent on localhost that's running StatsD (DogStatsD) using the statsd_host argument described in the ...
John's user avatar
  • 11.7k

15 30 50 per page
1
2 3 4 5
9