samedi 17 janvier 2015

Different output of lsof variant


I have a Java application utilizing the MongoDB Java driver (2.11.3). I'm using one static MongoClient instance across the whole application and as stated in the docs it should handle the connection pooling. After a long time (It's a BungeeCord, if you're familiar with Minecraft) it throws Too many open files exceptions. Having a look at



funville@node2:~$ lsof -p 5253 -n | grep 27017 | wc -l
16


shows us that there are 16 connections to port 27017. But when we look at



funville@node2:~$ lsof -n | grep 27017 | awk '{print $2}' | grep 16062 | wc -l
1872


it shows us a lot more connections than the first command.


First question is why the 2 commands do have a different output and the second is whether anyone of you has experienced something similar with the Java MongoDB driver.


Thanks in advance


/BR Christopher



Aucun commentaire:

Enregistrer un commentaire