Nikhil Gavali You can use .allowDiskUse(true) in mongoose to enable mongodb to store the data in Persistent storage instead of ram to avoid failure in data fetching. you should also look at getting cursor / stream from mongodb and reading from that stream. this would enable you to avoid timeout.