Connection reset by peer (Mongo::ConnectionFailure)

381 views
Skip to first unread message

onk...@cubictree.com

unread,
Jul 17, 2015, 12:41:01 AM7/17/15
to mongod...@googlegroups.com
/usr/local/lib/ruby/gems/2.0.0/gems/mongo-1.9.2/lib/mongo/networking.rb:323:in `rescue in receive_message_on_socket': Operation failed with the following exception: Connection reset by peer (Mongo::ConnectionFailure)
    from /usr/local/lib/ruby/gems/2.0.0/gems/mongo-1.9.2/lib/mongo/networking.rb:315:in `receive_message_on_socket'
    from /usr/local/lib/ruby/gems/2.0.0/gems/mongo-1.9.2/lib/mongo/networking.rb:176:in `receive_header'
    from /usr/local/lib/ruby/gems/2.0.0/gems/mongo-1.9.2/lib/mongo/networking.rb:167:in `receive'
    from /usr/local/lib/ruby/gems/2.0.0/gems/mongo-1.9.2/lib/mongo/networking.rb:133:in `receive_message'
    from /usr/local/lib/ruby/gems/2.0.0/gems/mongo-1.9.2/lib/mongo/cursor.rb:550:in `send_get_more'
    from /usr/local/lib/ruby/gems/2.0.0/gems/mongo-1.9.2/lib/mongo/cursor.rb:480:in `refresh'
    from /usr/local/lib/ruby/gems/2.0.0/gems/mongo-1.9.2/lib/mongo/cursor.rb:124:in `next'
    from /usr/local/lib/ruby/gems/2.0.0/gems/mongo-1.9.2/lib/mongo/cursor.rb:290:in `each'
    from azure-insert-details.rb:49:in `fetch'
    from azure-insert-details.rb:150:in `<main>'

How to resolve this error ??

Thanks

Stephen Steneker

unread,
Jul 19, 2015, 5:40:44 AM7/19/15
to mongod...@googlegroups.com, onk...@cubictree.com
Hi,

From the name of your script it looks like you might be running on Azure? If so, you may have to reduce your keepalive setting to avoid networking timeouts.

Information on setting the keepalive for Linux & Windows servers can be found in the MongoDB production notes:
 http://docs.mongodb.org/manual/administration/production-notes/#azure

If you're not on Azure, can you provide some details on your specific O/S, MongoDB deployment (standalone, replica set, or sharded cluster?) and hosting (AWS, bare metal, etc).

Regards,
Stephen
Reply all
Reply to author
Forward
0 new messages