node.js - Mongodb or mongoose performance issue -
i developed application backed nodejs/mongodb , frontend in angularjs 1.6.5. application used provide realtime analytics , data being increased in size every single minute new data.
as database size increasing, queries taking longer time execute , sometime fails , giving 404 error. (nginx server) strange thing whenever ran same query in mongo shell in server .explain('executionstats') method giving immediate responses execution time 0 millisecond.
so per above screenshots, limit of 10 data mongo shell executing in no time in browser when hitting db through node , mongoose took 1 min couldn't possible return result (maybe nginx returning 404 after specif time)
but try in mongo shell after without setting limit returning data 6331522 records in less 4 seconds.
i have no clue issue exactly. appriciated
Comments
Post a Comment