Connection reset problem

1,264 views
Skip to first unread message

Sarnam

unread,
May 8, 2012, 12:03:58 PM5/8/12
to mongod...@googlegroups.com
Hi,
   I am doing load testing (using jmeter tool) of mongoDb (2.0.5) implementation with C# driver version 1.4.2. I encountered a connection reset problem like:

java.net.SocketException: Connection reset
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at org.apache.jmeter.protocol.http.sampler.HTTPSampler.readResponse(HTTPSampler.java:267)
    at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:516)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:965)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:951)
    at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:348)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:243)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
    at java.net.URLConnection.getHeaderFieldInt(Unknown Source)
    at java.net.URLConnection.getContentLength(Unknown Source)
    at org.apache.jmeter.protocol.http.sampler.HTTPSampler.readResponse(HTTPSampler.java:237)
    ... 6 more

So please help me to fix this problem. Your efforts will be highly appreciable.

Thanks
Sarnam

Scott Hernandez

unread,
May 8, 2012, 12:12:02 PM5/8/12
to mongod...@googlegroups.com
What is the cause of network issue? Are you seeing network errors or
is this a replica set?

What does the server state/logs look like during this time? (please
post logs/mongostat to gist/pastebin/pastie/etc during these errors)
> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to
> mongodb-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/mongodb-user?hl=en.

Sarnam

unread,
May 8, 2012, 12:25:52 PM5/8/12
to mongod...@googlegroups.com
Hi,
Thanks for reply.

I am not seeing any exception either in application log or in MongoDB log. But while doing load testing using Jmeter tool , its gives this error in 2-3 threads out of 100 threads.
  I am not using any replica, just using only single replica or we can say primary database. No sharding or no replica.

Thanks
Sarnam

Scott Hernandez

unread,
May 8, 2012, 12:31:36 PM5/8/12
to mongod...@googlegroups.com
Can you please post the output of mongostat and the logs during these errors?

Sarnam

unread,
May 10, 2012, 7:08:03 AM5/10/12
to mongod...@googlegroups.com
Please find Mongostats:
 
> db.serverStatus()
{
        "host" : "Techserver1",
        "version" : "2.0.5-rc1",
        "process" : "mongod",
        "uptime" : 8127,
        "uptimeEstimate" : 6518,
        "localTime" : ISODate("2012-05-10T10:55:55.935Z"),
        "globalLock" : {
                "totalTime" : 8127689654,
                "lockTime" : 18500,
                "ratio" : 0.0000022761695866297405,
                "currentQueue" : {
                        "total" : 0,
                        "readers" : 0,
                        "writers" : 0
                },
                "activeClients" : {
                        "total" : 0,
                        "readers" : 0,
                        "writers" : 0
                }
        },
        "mem" : {
                "bits" : 64,
                "resident" : 94,
                "virtual" : 513,
                "supported" : true,
                "mapped" : 208,
                "mappedWithJournal" : 416
        },
        "connections" : {
                "current" : 29,
                "available" : 19971
        },
        "extra_info" : {
                "note" : "fields vary by platform",
                "page_faults" : 1742561,
                "usagePageFileMB" : 31,
                "totalPageFileMB" : 131049,
                "availPageFileMB" : 104092,
                "ramMB" : 65525
        },
        "indexCounters" : {
                "note" : "not supported on this platform"
        },
        "backgroundFlushing" : {
                "flushes" : 135,
                "total_ms" : 5487,
                "average_ms" : 40.644444444444446,
                "last_ms" : 7,
                "last_finished" : ISODate("2012-05-10T10:55:29.361Z")
        },
        "cursors" : {
                "totalOpen" : 2,
                "clientCursors_size" : 2,
                "timedOut" : 38
        },
        "network" : {
                "bytesIn" : 1841768,
                "bytesOut" : 4195249950,
                "numRequests" : 22857
        },
        "opcounters" : {
                "insert" : 0,
                "query" : 19942,
                "update" : 0,
                "delete" : 0,
                "getmore" : 1208,
                "command" : 1704
        },
        "asserts" : {
                "regular" : 0,
                "warning" : 0,
                "msg" : 0,
                "user" : 0,
                "rollovers" : 0
        },
        "writeBacksQueued" : false,
        "dur" : {
                "commits" : 22,
                "journaledMB" : 0,
                "writeToDataFilesMB" : 0,
                "compression" : 0,
                "commitsInWriteLock" : 0,
                "earlyCommits" : 0,
                "timeMs" : {
                        "dt" : 3090,
                        "prepLogBuffer" : 0,
                        "writeToJournal" : 0,
                        "writeToDataFiles" : 0,
                        "remapPrivateView" : 0
                }
        },
        "ok" : 1
}

there is no error in logfile.

So please look at these statistics.

Thanks
Sarnam Singh

Scott Hernandez

unread,
Jun 1, 2012, 4:26:17 PM6/1/12
to mongod...@googlegroups.com
mongostat is a tool which show samples of data over intervals as
described here: http://docs.mongodb.org/manual/reference/mongostat/

These static stats don't help much, unfortunately.

Gianfranco

unread,
Oct 25, 2012, 11:53:27 AM10/25/12
to mongod...@googlegroups.com, sarn...@gmail.com
Are you using the same versions 2.0.5?
Please open a new Topic/Thread specifying the problem and reason why using 2.0.5 instead 2.0.7 or 2.2.0

On Wednesday, October 10, 2012 6:32:40 AM UTC+1, pohit sharma wrote:


On Friday, 5 October 2012 16:02:44 UTC+5:30, pohit sharma wrote:
i m also facing this problem..have u fixed this problem..if yes plz share with me thanks in advance.

pohit sharma

unread,
Oct 25, 2012, 11:03:14 PM10/25/12
to mongod...@googlegroups.com, sarn...@gmail.com
Hi Gianfranco,

Thanks for Your reply..I am using Jmeter 2.7 version and testing my
moodle e-learning site on localhost.

Thanks and regards,
Pohit
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user...@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
Reply all
Reply to author
Forward
0 new messages