MongoDb taking time in saving document on production
I am saving a mongo document using mongotemplate in java spring boot. But sometimes it is taking time to save the document. usually it is taking 2 Min to save the document.
I have checked in the mongo server graphs, during that time pageout seems to be increase. I am having t2.medium aws server.
Graph Reference of mongo db server is attached(See the Page OUT spike 13376).
please suggest what should I do to sort this page OUT issue…