I actually found the culprit to be a few ajax request that each ran every few seconds to check if the server is still up or not(it's a long story but has to be done). Then I found a small memory-saving solution online: to put all the ajax requests in a variable and then clear the variable after use(I also cleared unused java-script variables application-wide). Here is an example below:
function getData(){
var request = $.ajax({
url : "/someurl",
type : "HEAD",
dataType : "json",
success : function(data) {
//use your data
}
error: function(){
//doSomething
},
cache : false
});
//HERE IS THE HACK! :)
data = null;
request.onreadystatechange = null;
request.abort = null;
request = null;
}
setTimeout(function(){
getData();
}, 0.05 * 60 * 1000)
}
P.S I found the code online.