No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
manpreet
Best Answer
2 years ago
So when I connect to a MongoDB with multiple hosts, there is a delay in every one minute when executing a command. The delay time is exactly 10 seconds. I know this sounds so weird.
First I thought that the problem is related to MongoDB server configuration. But it only happens when I use PHP mongodb driver because it works fine when I tested with Java mongodb driver. - MongoDB Server: 3.6 - PHP mongodb driver: 1.5.3 - Java mongodb driver: 3.10.1
I also tested older version of PHP mongodb driver with the same problem.
PHP
Full source code: https://drive.google.com/open?id=1r-EKiCntZbUq59sFzaBOiCrfy0tzjadt
Java
Full source code: https://drive.google.com/open?id=1TYTFrRxUiQUZdIUJdetllHpnOYHQiepd
I repeated the script above every 2 seconds, so here is result I tested:
PHP
Java