Skip to content
Discussion options

You must be logged in to vote

Is there any solution to this? Is there any other way to create static classes that will not persist over different requests? I think its definitely an issue, and potentially a security concern.

It's not a security concern. You are running your application in a python process, so it's normal that your counter goes up.

This could be avoided by setting uvicorn to one worker per request, but it would be too slow.

That's not true. It cannot be avoided. Those are python processes. The application is not stateless because you're coding it as non-stateless, it's not a web framework or server issue, it's just an implementation issue.

I understand what you mean by this issue, but there's a mis…

Replies: 10 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Kludex
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem question-migrate
4 participants
Converted from issue

This discussion was converted from issue #5045 on February 28, 2023 16:01.