Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Problem with mongo 2.2.0 and java connection
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sebastian Gutierrez  
View profile  
 More options Oct 8 2012, 10:25 am
From: Sebastian Gutierrez <scg...@gmail.com>
Date: Mon, 8 Oct 2012 12:12:13 -0200
Local: Mon, Oct 8 2012 10:12 am
Subject: Problem with mongo 2.2.0 and java connection
Hi,

I´m starting to use mongo for a new project, and using the last 2.2.0 and the last 2.9.1 java driver

I´m getting this:

Exception in thread "ReplicaSetStatus:Updater" java.lang.OutOfMemoryError: Java heap space
        at org.bson.io.PoolOutputBuffer.<init>(PoolOutputBuffer.java:223)
        at com.mongodb.Mongo$1.createNew(Mongo.java:624)
        at com.mongodb.Mongo$1.createNew(Mongo.java:621)
        at org.bson.util.SimplePool.get(SimplePool.java:44)
        at com.mongodb.OutMessage.<init>(OutMessage.java:132)
        at com.mongodb.OutMessage.<init>(OutMessage.java:124)
        at com.mongodb.OutMessage.query(OutMessage.java:83)
        at com.mongodb.OutMessage.query(OutMessage.java:79)
        at com.mongodb.OutMessage.query(OutMessage.java:75)
        at com.mongodb.DBPort.findOne(DBPort.java:142)
        at com.mongodb.DBPort.runCommand(DBPort.java:148)
        at com.mongodb.ConnectionStatus$UpdatableNode.update(ConnectionStatus.java:184 )
        at com.mongodb.ReplicaSetStatus$UpdatableReplicaSetNode.update(ReplicaSetStatu s.java:614)
        at com.mongodb.ReplicaSetStatus$Updater.updateAll(ReplicaSetStatus.java:766)
        at com.mongodb.ReplicaSetStatus$Updater.run(ReplicaSetStatus.java:736)
Exception in thread "ReplicaSetStatus:Updater" Exception in thread "ReplicaSetStatus:Updater" Exception in thread "ReplicaSetStatus:Updater" Exception in thread "ReplicaSetStatus:Updater" Exception in thread "ReplicaSetStatus:Updater" Exception in thread "ReplicaSetStatus:Updater" Exception in thread "ReplicaSetStatus:Updater" Exception

there is no query at all just connected.

I´m connected like this:

   static private  Mongo M;
     static private DB MDB;

     M = new Mongo(hosts);
            M.setWriteConcern(WriteConcern.SAFE);
            MDB= M.getDB( DataBase);

best regard.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gianfranco  
View profile  
 More options Oct 8 2012, 11:01 am
From: Gianfranco <gianfra...@10gen.com>
Date: Mon, 8 Oct 2012 08:01:39 -0700 (PDT)
Local: Mon, Oct 8 2012 11:01 am
Subject: Re: Problem with mongo 2.2.0 and java connection

In what platform are you compiling this? Windows, Mac, Linux, etc?

See this page for more info on this JVM heap issue:
http://stackoverflow.com/questions/37335/how-to-deal-with-java-lang-o...

It's not a mongodb driver or database issue.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sebastian Gutierrez  
View profile  
 More options Oct 8 2012, 11:43 am
From: Sebastian Gutierrez <scg...@gmail.com>
Date: Mon, 8 Oct 2012 13:43:05 -0200
Local: Mon, Oct 8 2012 11:43 am
Subject: Re: [mongodb-user] Problem with mongo 2.2.0 and java connection

compiling on mac, running on linux

java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)

same arquitecture I have with mysql, remember this is doing nothing. is just when starts, until my server goes down…..

ReplicaSetStatus is not from my code..

any idea?

thanks!

On Oct 8, 2012, at 1:01 PM, Gianfranco <gianfra...@10gen.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Octavian Covalschi  
View profile  
 More options Oct 8 2012, 1:29 pm
From: Octavian Covalschi <octavian.covals...@gmail.com>
Date: Mon, 8 Oct 2012 12:29:22 -0500
Local: Mon, Oct 8 2012 1:29 pm
Subject: Re: [mongodb-user] Problem with mongo 2.2.0 and java connection

Is this a web app? Are you passing any jvm args at all? Also, is this code
executed only once? If yes, when?

On Mon, Oct 8, 2012 at 10:43 AM, Sebastian Gutierrez <scg...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sebastian Gutierrez  
View profile  
 More options Oct 9 2012, 7:38 am
From: Sebastian Gutierrez <scg...@gmail.com>
Date: Tue, 9 Oct 2012 09:38:06 -0200
Local: Tues, Oct 9 2012 7:38 am
Subject: Re: [mongodb-user] Problem with mongo 2.2.0 and java connection

yes is a war file

is executed one, and is on a singleton class, in the startup of the application.

ejecution:

 java -jar WorkforceServer.jar JAVA_OPTS=-server -Xms128M -Xmx512M -Duser.language=es -Djava.awt.headless=true -XX:PermSize=64m -XX:MaxPermSize=128m -d64 &

this is a jetty server that deploys the war file, as I said, is doing nothing just starting, same arquitecture I have with mysql with no problems.

thanks

On Oct 8, 2012, at 3:29 PM, Octavian Covalschi <octavian.covals...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Fwd: [mongodb-user] Problem with mongo 2.2.0 and java connection" by Sebastian Gutierrez
Sebastian Gutierrez  
View profile  
 More options Oct 10 2012, 8:56 am
From: Sebastian Gutierrez <scg...@gmail.com>
Date: Wed, 10 Oct 2012 10:55:50 -0200
Local: Wed, Oct 10 2012 8:55 am
Subject: Fwd: [mongodb-user] Problem with mongo 2.2.0 and java connection

any idea???

I´m totally lost with this.

thanks

Begin forwarded message:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Problem with mongo 2.2.0 and java connection" by Octavian Covalschi
Octavian Covalschi  
View profile  
 More options Oct 10 2012, 9:06 am
From: Octavian Covalschi <octavian.covals...@gmail.com>
Date: Wed, 10 Oct 2012 08:06:06 -0500
Local: Wed, Oct 10 2012 9:06 am
Subject: Re: [mongodb-user] Problem with mongo 2.2.0 and java connection

What framework are you using to create your web app? Can you check the
actual memory usage with visualvm tool?

Also, can you create a simple console app with the same code used and
connect to mongodb? Maybe this will narrow it down...

On Wed, Oct 10, 2012 at 7:55 AM, Sebastian Gutierrez <scg...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Octavian Covalschi  
View profile  
 More options Oct 10 2012, 10:00 am
From: Octavian Covalschi <octavian.covals...@gmail.com>
Date: Wed, 10 Oct 2012 09:00:02 -0500
Local: Wed, Oct 10 2012 10:00 am
Subject: Re: [mongodb-user] Problem with mongo 2.2.0 and java connection

Also, can you try an older version of java diver? 2.8.x or even 2.7.x ?
That will help to exclude the driver..

On Wed, Oct 10, 2012 at 8:06 AM, Octavian Covalschi <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sebastian Gutierrez  
View profile  
 More options Oct 10 2012, 10:55 am
From: Sebastian Gutierrez <scg...@gmail.com>
Date: Wed, 10 Oct 2012 12:55:24 -0200
Local: Wed, Oct 10 2012 10:55 am
Subject: Re: [mongodb-user] Problem with mongo 2.2.0 and java connection

the components are:

JAX and Jersey for RESTFull webservice, as I said, everything is the same as I have on other apps that serves many connections with mysql with no problem.

is there anyway to give more log?? or give someone access to check? Im evaluating NoSQL databases for a big project, and Mongo seems like the one I would like to use, but I feel like I can´t even start with
it, I also tested driver 2.8.1 with the same result.

maybe some mongo configuration??? I haven´t touch any config since install

I will try to make a console application as soon as I can.

thanks

On Oct 10, 2012, at 11:06 AM, Octavian Covalschi <octavian.covals...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Yemin  
View profile  
 More options Oct 10 2012, 12:26 pm
From: Jeff Yemin <jeff.ye...@10gen.com>
Date: Wed, 10 Oct 2012 09:26:57 -0700 (PDT)
Local: Wed, Oct 10 2012 12:26 pm
Subject: Re: [mongodb-user] Problem with mongo 2.2.0 and java connection

Try using jmap -histo to get some more information about what types of
objects are responsible for the memory consumption.

Regards,
Jeff


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robert Stewart  
View profile  
 More options Oct 12 2012, 12:15 am
From: Robert Stewart <atacam...@gmail.com>
Date: Thu, 11 Oct 2012 21:15:36 -0700 (PDT)
Local: Fri, Oct 12 2012 12:15 am
Subject: Re: Problem with mongo 2.2.0 and java connection

I agree with the recommendations to try VisualVM (or even jconsole) or
jmap. VisualVM will be very helpful for monitoring heap growth before and
after you connect to MongoDB, as well as for checking which classes'
objects are occupying most of the heap.

You might also want to try the following JVM args:

-verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps
-XX:+PrintGCApplicationStoppedTime -XX:+PrintHeapAtGC

This will write a log file with a lot of useful info on heap usage and
garbage collection. You can then tail it while connecting. Make sure the
argument to -Xloggc includes a relative or absolute path to a directory
your webapp can write to, such as your webapp's existing log directory.

I've used the above JVM args to track down several memory-related problems.
The overhead is pretty small, so I use those settings in production with an
app that has a 55 GB heap.

Robert


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »