Solved the thread leak of mongo connection