-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Our freedomains server is experiencing memory issues that are causing significant disruptions in our application's performance, impacting our users. The server's memory usage spikes and remains elevated, and we suspect a potential memory leak in some JS libraries, particularly tesseract.js.
We have implemented a temporary solution by adding some swap memory to free up RAM memory, allowing the server to continue functioning. However, we need to identify the root cause of the issue and implement a permanent solution to prevent it from recurring.
One proposed solution is to limit docker instances memory by updating the createContainer
function in myProxy/src/helpers/docker.ts
. We recommend adding a new parameter to the options that includes HostConfig
with a Memory
of 1024m
.
Line 30 in 7a36e7e
const createContainer = async ( |
"HostConfig": {
"Memory": 1024m,
}
Another solution is to free up more space by killing some of the old apps running.
Additionally, we need to investigate the myProxy code to determine why old apps are not being removed from the server.