Map/Reduce error 10293 using a $within $box query

49 views
Skip to first unread message

Andrew Bloom

unread,
Oct 2, 2011, 3:56:57 PM10/2/11
to mongod...@googlegroups.com
I'm having a bit of a problem folks. I've got a rather large dataset (~4.5 million records) with a very simple "schema" (1). I'm trying to run a map/reduce query over a subset of this data (2) and generate some counts but the query seems to cause Mongo to blow up (3). I've spent a few weeks reading and experimenting and have failed. I know the geo spacial indexing works as I've included a $within $box count before running the map/reduce and see 119236 results.

Can anyone make sense of this? Please tell me what I'm doing wrong. I know as a work around I could run the query, build a new collection and then map/reduce over the new collection but I'd really love to keep this as simple as possible as I plan on running this from Ruby with MongoMapper. I'm only experimenting with the Mongo console and JS scripts while trying to debug this issue.

Thanks
Andrew

Greg Studer

unread,
Oct 3, 2011, 12:39:38 PM10/3/11
to mongodb-user
Think this may be an issue with large intermediate result sets and non-
yielding cursors - but to double check, is it possible to run a
modified form of the query in a smaller area which only returns a few
results (< 600 or so?)

Andrew Bloom

unread,
Oct 3, 2011, 12:45:41 PM10/3/11
to mongod...@googlegroups.com
Greg,

Thanks. I think you're onto something. I kept experimenting with this yesterday and tried exactly that, it worked perfectly.

Do you have any ideas how to keep Mongo from crashing with these large sets?

Thanks
Andrew

Greg Studer

unread,
Oct 3, 2011, 2:28:42 PM10/3/11
to mongod...@googlegroups.com
For now, unfortunately, I think the workaround is to build the new
collection, as you hoped not to do, or tile the larger region into a
set of smaller regions to M/R sequentially.
Also opened SERVER-4002 to track.

> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/mongodb-user/-/g3LK2_1tbOUJ.
> 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.
>

Reply all
Reply to author
Forward
0 new messages