java - Can an instance of MongoClient be long running -


this morning found java servlet (tomcat 7) interacts mongodb (using standard java mongo driver) had failed after running approximately 1.5 days. in context listener servlet instance of mongoclient defined, , there connects database. use mongoclient instance perform database interaction, in separate functions call mongoclient.getdb(dbname) database object use perform queries.

have done wrong? should checking connection live or handled mongoclient object, i'm aware provides pool of connections - assumed (mother of mistakes) keeps connections database live no management.

thanks much, apologies simple question,

mark

i found there memory leak else in servlet. fixed not having problems. means yes instances of mongoclient can see can long running (so far mine has been running on 2 days!).


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -