Python 리소스 제한
1. 개요파이썬을 데몬 개발을 하다 보면, 해당 데몬이 문제를 메모리를 많이 먹거나, 프로세스를 너무 많이 생성하거나, 파일을 너무 많이 오픈하여, 서버 전체에 문제를 일으키는 경우가 발생하는데, 이를 해결하기 위한 방법을 찾아보았다.2. Resource limitshttps://docs.python.org/2/library/resource.htmlhttp://pythonforbiologists.com/index.php/measuring-memory-usage-in-python/import resourceprint resource.getrlimit(resource.RLIMIT_AS)print resource.getrusage(resource.RUSAGE_SELF)resource.setrlimit(reso..
프로그래밍
2016. 8. 10. 15:15
warpmemory
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
페이지
TAG
- check
- 명령어
- 외부링크
- deview
- command
- monitoring
- Web
- 예제
- Ansible
- Windows
- 번역
- MariaDB
- httpd
- Python
- code
- 코드
- Linux
- Module
- error
- example
- engineering
- 이슈처리
- File
- apache
- RESTful
- PowerShell
- limits
- mysql
- configuration
- client
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함