# Mongodb Intialsync failed at specific db collection

**URL:** <https://forums.percona.com/t/mongodb-intialsync-failed-at-specific-db-collection/23922>\
**Category:** Percona Operator for MongoDB\
**Created:** [July 26, 2023, 12:32pm UTC](https://forums.percona.com/t/mongodb-intialsync-failed-at-specific-db-collection/23922 "2023-07-26T12:32:54Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Ahmed\_Asim](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ahmed_asim/32/11499_2.png) [@Ahmed\_Asim](https://forums.percona.com/u/Ahmed_Asim)\
**Post date:** [July 31, 2023, 2:07am UTC](https://forums.percona.com/t/mongodb-intialsync-failed-at-specific-db-collection/23922/21 "2023-07-31T02:07:27Z")

</div>

also noticed that during this slow query on that particular collection, the DB(which is doing the Initialsync) received some batches and starts saving a snapshot on the disk at this point it takes some time (more than 10 minutes) and keeps the connection with the sync source host ideal for 10 minutes which hits the limit of “cursorTimeoutMillis” : NumberLong(600000)` which caused the connection ended.

I’m not sure if this makes any sene to you but I believe if can increase this value cursorTimeoutMillis or making the saving snapshot process take less time that will fix the initialsync issue .  
I will be waiting for your kind feedback about the above, thank you

---

<div class="post-metadata">

**Author:** ![Ahmed\_Asim](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ahmed_asim/32/11499_2.png) [@Ahmed\_Asim](https://forums.percona.com/u/Ahmed_Asim)\
**Post date:** [August 3, 2023, 12:56pm UTC](https://forums.percona.com/t/mongodb-intialsync-failed-at-specific-db-collection/23922/22 "2023-08-03T12:56:54Z")

</div>

For anyone who might face this issue with initialsync, I found the issue with TCP connections getting dropped after sometime with reason “expired connection pool”, I tried to adjust kernel TCP keeplive values but mongo overrides it with 5 minutes max, anyway I couldn’t fix this.

The only solution to make it work is to pre-seed the data using rsync to the other nodes, then the replication will work ✅

[Previous page](https://forums.percona.com/t/mongodb-intialsync-failed-at-specific-db-collection/23922.md?page=1)
