encode / uvicorn

An ASGI web server, for Python. 🦄
https://www.uvicorn.org/
BSD 3-Clause "New" or "Revised" License
8.11k stars 701 forks source link

The service process always interrupts abnormally after certain requests #2284

Closed TheHonestBob closed 3 months ago

TheHonestBob commented 3 months ago

Initial Checks

Discussion Link

Description

I deployed a dataframe data service using FastAPI. When I used the df.parallel_apply method instead of df.apply, the service always terminated abnormally. The same request for df.apply did not encounter this problem. When I started the program using the following command and checked the logs,: uvicorn server:app --port=49000 --host=0.0.0.0 --access-log --log-level=trace I found the following problem. It seems that when I started processing dataframe data through multiple processes, for some unknown reason,the program sent a shutdown signal to the ASGI server image

Example Code

No response

Python, Uvicorn & OS Version

Running uvicorn 0.27.0.post1 with CPython 3.9.18 on Linux

[!IMPORTANT]

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.

Fund with Polar