Port number changes in access logs #6611
-
First Check
Commit to Help
Example Codefrom fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
# Call the api once every 50 to 100 ms.DescriptionI start a fastapi server on a port. I can access the server on that port, but the access logs show a changing port number for each request. What is happening there? For example, I started a server on port 0 and it starts on port 55646. Initially accesses to this server are reported as port 55646, but eventually it starts reporting 55653. Note that I continue to access the server on port 55646. I have seen situations where this port number increments on every call. Is uvicorn somehow truly using these ports? Do I have to worry about it trying to use a pre-existing port? Operating SystemWindows Operating System DetailsWindows 10. FastAPI Version0.65.2 Python VersionPython 3.8.10 Additional ContextNo addition context. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
It's the client's address. |
Beta Was this translation helpful? Give feedback.
-
|
@Kludex Thank you! |
Beta Was this translation helpful? Give feedback.
It's the client's address.