FAST API memory leak issue #11761
Unanswered
zhangyukun230
asked this question in
Questions
Replies: 1 comment 1 reply
-
Did you solve it ? , i have a api rest api, i just make what to endpoints does in a websocket, but even when i close the websocket i got a lot of memory |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
Centos machine, Python 3.10
![image](https://private-user-images.githubusercontent.com/37434447/342673943-3d4e7c3a-deb9-4450-8cf2-4784f1566326.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5NzgxMzAsIm5iZiI6MTcyNDk3NzgzMCwicGF0aCI6Ii8zNzQzNDQ0Ny8zNDI2NzM5NDMtM2Q0ZTdjM2EtZGViOS00NDUwLThjZjItNDc4NGYxNTY2MzI2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMwVDAwMzAzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBlMDE5NjJjOTAyMGFmZTA5NjI4MzA4MWU2YWNkNzE4Y2MyMmFkYjhiNjU1OTUyOWE3MzU2OWUxNTcyMzA1MDAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.i14kRnBIsbpsyjvMZ8k_vyga7YB72Qso2UOsv59NofQ)
![image](https://private-user-images.githubusercontent.com/37434447/342674482-e329e714-df84-4251-9aff-70915b585453.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5NzgxMzAsIm5iZiI6MTcyNDk3NzgzMCwicGF0aCI6Ii8zNzQzNDQ0Ny8zNDI2NzQ0ODItZTMyOWU3MTQtZGY4NC00MjUxLTlhZmYtNzA5MTViNTg1NDUzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMwVDAwMzAzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZlZGVlNzg2MTFmMTk1NjNlNTViZDgyN2M4ZTIzZmMxOTM2ZTAzYWRiZWNhZjdiYzQ2NWQ2NmYyNWU1Y2FkYjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._czmJRKWBQvctBErMTCIafYySjcLqs4nhCYt8gDdeMA)
Using Fastapis to build websocket services,. Open some web pages, VIRT and RES increase a lot first, and after closing, RES memory only decreases slightly. But after opening a lot of web pages and then closing them, RES memory will decrease significantly, while VIRT will still increase significantly
This issue does not exist on Mac.
Why is this?
linux
mac
Operating System
Linux
Operating System Details
Centos7.2 machine, Python 3.10 fast api 0.111.0
FastAPI Version
0.111.0
Pydantic Version
2.7.1
Python Version
3.10
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions