Opening and closing 16000 Mongo DB instances in PHP (AND now Ruby)

8 views
Skip to first unread message

Christopher Pearce

unread,
Jan 16, 2012, 5:26:51 PM1/16/12
to mongodb-user
Hey,

I've been trying to run some Benchmarks for my application and have
encountered some issues with MongoDB (I'm assuming something to do
with connections) which on looping over the following process, always
dies on around 16000 loops.

The process is simple: open a connection, insert a really small
document, close the connection.

I have a question on StackOverflow with much more information so if
it's alright for me to just leave a link here and get some help there
that's great!

http://stackoverflow.com/questions/8865533/opening-and-closing-16000-mongo-db-instances-in-php

Thanks in advance for any help!

Nat

unread,
Jan 17, 2012, 8:44:53 AM1/17/12
to mongod...@googlegroups.com
Already answer there. Basically you ran out of file descriptors either on the client or the server side since they may be pending on wait state. You should really use connection pool/persisted connection. It's there to reduce the number of opening/closing connections.
--
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.

Reply all
Reply to author
Forward
0 new messages