Skip to content

BackgroundTask context not returning Memory when using aiohttp client #2790

Discussion options

You must be logged in to vote

Hello @rumbarum, @Kludex i have done some researches and now i can give you more details about this situation.

Short Answer: there is not problem with BackgroundTask, aiohttp or anything related with that.

Long Answer with explanation:

  1. According with your locust settings your are testing an endpoint with 1 user --> 1 connection x time ( keep in mind this for later)
  2. When you use aiohttp_run inside the endpoint you are basically waiting for the response before responding to the client.
  3. When you create and add aiohttp_run to a BackgroundTask, you are basically "schedulig" a task after the response and returning the response.

So where is the difference?
Referring to point 1 you are using ju…

Replies: 3 comments 8 replies

Comment options

Kludex
Dec 11, 2024
Maintainer Sponsor

You must be logged in to vote
5 replies
@rumbarum
Comment options

@rumbarum
Comment options

@rumbarum
Comment options

@rumbarum
Comment options

@rumbarum
Comment options

Comment options

You must be logged in to vote
2 replies
@rumbarum
Comment options

@rumbarum
Comment options

Comment options

You must be logged in to vote
1 reply
@rumbarum
Comment options

Answer selected by rumbarum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants