I have problem with "dump" then "delete" large data MONGODB
db have already index fields need to query
total data ~50m records
filtered data have to dump and delete ~5m
3 server:
-- MONGO t2.medium
-- SIDEKIQ t2.small
-- OTHER SERVER t2.small (multi)
I run cronjob at the less traffic time. But it take too much time to complete job, ~6-8h and when it running , other-server can't connect MONGODB, then other-server change to status degrade ( elasticbeantalk with docker )
when server down, I check MONGODB mongostat: cpu taking ~95-96%. OTHER SERVER logs is "can not connect to db".
Please, Someone have experience of mongodb that help me work out this