Mongo DB connection via pymongo in Python not responding or hangs intermittently

Hi, we are using pymongo version 3.10. We are facing the same issue in pymongo version 3.9 also.
It seems that at some point mongo db operations freezes. Even though that particular operation including ping command never responds the very next operation may be success.