Closed
Description
Issue Description
It has been observer that the new caching mechanism (LRUCache) would not prune proactively it's cache after a certain amount of time, leading to memory growth and explosion.
Steps to reproduce
- Startup a parse-server, without enableSingleSchemaCache
- use heapdump through
require('heapdump')
in your startup script - notice that the memory keeps growing after each request.
Expected Results
Memory usage should somewhat remain constant, unused data should not be kept indefinitely.
Environment Setup
-
Server
- parse-server version (Be specific! Don't say 'latest'.) : >= 2.5.1
- Operating System: n/a
- Hardware: n/a
- Localhost or remote server? local
-
Database
- MongoDB version: n/a
- Storage engine: n/a
- Hardware: n/a
- Localhost or remote server? n/a
Logs/Trace
See discussion over: #4235
Suggested resolution:
1- make singleSChemaCache default (this should be pretty harmless)
2- actively cleanup upon response end the schema cache used for the request
3- actively prune LRU cache dropping older values periodically
Metadata
Metadata
Assignees
Labels
No labels