You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a bug where two separate requests, a few seconds apart, consistently receive the response from the first request. Here is the client-side request:
async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=1200)) as aiohttp_session:
PS_extension = "/" + str(random.randint(1, 1000000))
headers = {
'Cache-Control': 'no-cache'
}
async with aiohttp_session.post(PS_URL + "/task_execution" + PS_extension,
data=pp_data, timeout=1200, headers=headers) as aiohttp_response:
And this is the custom server-side endpoint with FastAPI:
Unfortunatelly, the response is not specific to the request, even if there is a random number. It's worth noting that the response takes a long time due to a lengthy Deep Learning generation process (30 seconds to 1 minute), so it's not a latency or performance issue.
To Reproduce
Send 2 simultaneous requests with json data from 2 different devices
Wait 30 seconds to 1 minute
Both devices receive the first answer
Expected behavior
Every request should have its corresponding answer.
Logs/tracebacks
None.
Python Version
$ python --version3.9
aiohttp Version
$ python -m pip show aiohttpVersion: 3.8.3
multidict Version
$ python -m pip show multidictVersion: 6.0.4
yarl Version
$ python -m pip show yarlVersion: 1.8.2
OS
Windows 11
Related component
Server, Client
Additional context
Google App Engine
Code of Conduct
I agree to follow the aio-libs Code of Conduct
The text was updated successfully, but these errors were encountered:
You'll need to create a full reproducer, it seems incredibly unlikely that this is an issue with aiohttp, as it seems like it'd affect 1000s of users if that was really happening.
It still looks very unlikely to be an issue with aiohttp. I just can't imagine how 2 requests could resolve the same response, they have separate connections and are isolated objects. Unless you can reproduce this with an aiohttp server, I feel like this is an issue with FastAPI (or your code).
Describe the bug
I have a bug where two separate requests, a few seconds apart, consistently receive the response from the first request. Here is the client-side request:
And this is the custom server-side endpoint with FastAPI:
Unfortunatelly, the response is not specific to the request, even if there is a random number. It's worth noting that the response takes a long time due to a lengthy Deep Learning generation process (30 seconds to 1 minute), so it's not a latency or performance issue.
To Reproduce
Expected behavior
Every request should have its corresponding answer.
Logs/tracebacks
Python Version
aiohttp Version
multidict Version
yarl Version
OS
Windows 11
Related component
Server, Client
Additional context
Google App Engine
Code of Conduct
The text was updated successfully, but these errors were encountered: