Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have made a simple test of MongoDB under windows environment. The single collection of objects with ID (int32) and Buffer (byte[4096]) was filling sequentially. After reaching of almost 15G (of 16G total) RAM, environment becames glitching. Some apps were killed, desktop changed its resolution, then it completely hangs. After hard reboot I've found a lot of such records in mongo log:

VirtualProtect failed (mcw) e:/Databases/+MongoDB/TestFS/TestFS.7 256400000000 4000000 errno:1455 The paging file is too small for this operation to complete.

MapViewOfFile failed e:/Databases/+MongoDB/TestFS/TestFS.26 errno:1450 Insufficient system resources exist to complete the requested service.

Also, MongoDB failed to connect anymore (to any database). Journaling was enabled. No any errors in log. I was able to heal it only by deleting the journal and corrupted database. That's far from the behaviour I'd like to see in production, but I know, that there is a lot of production installations existing. So I'm trying to understand, what have I missed or doing wrong.

share|improve this question

closed as not constructive by Tom O'Connor, RobM, Iain, Shane Madden, Ward Oct 16 '11 at 19:25

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Desktop resolution? On a production server? o.O –  Tom O'Connor Oct 16 '11 at 10:18
    
MongoDB on Windows? o.O O.o –  Tom O'Connor Oct 16 '11 at 10:19
1  
Don't you ever meet the testing on workstations before deploying to servers? And yes, I'm using windows environment sometimes. As well as it is used by this site and stackoveflow. Whats the problem? –  Stan Oct 16 '11 at 10:40
add comment

1 Answer 1

Right. Let's take a look at how I'd run a production MongoDB cluster (yes, cluster.. You don't want just one server)

1) Use Linux. Seriously. It's a hell of a lot more predictable for memory management and so on than Windows is. You're also more likely to find people who can help you tune a Mongo server on Linux.

2) Give it lots of RAM. RAM is cheap. I've just specced up some production-grade servers for $job, and they're 36GB of fast ECC DDR3.

3) Give it fast disks. SAS is good, I suspect SSD might be even better, but haven't specifically tested that.

4) Shard. Pick a decent shard key, and shard across multiple MongoDB nodes based on that.

5) Importantly. Make sure that you have a cluster of servers that can still perform a consensus number of votes.

Seriously. I think you should take a look at the points above, and also read of some of these Production Deployments. 10gen go out of their way to make lots of documentation available for MongoDB, and I suspect that you've not read all of it in it's entirety.

share|improve this answer
    
1. I have a lot of database projects on windows servers in HA production usage. OS is not a problem. BTW this site as well as stackoverflow is working on w2k8. 2. I have to store several terabytes. Should I fill servers with such amount of RAM? 3,4,5. How the SSD disks, shards, etc help me to avoid errors I've seen in logs and to restore database on the crashed server. That was the point, I did not ask, how to setup highperf server. –  Stan Oct 16 '11 at 10:33
3  
Well, considering it's a Sunday and your question was posted 3 hours ago at the time I'm posting this your answer of "got a lot of bullshit" is rather offensive. Most users wouldn't have seen this question yet to contribute. –  Bart Silverstrim Oct 16 '11 at 13:28
2  
Second, if @TomO'Connor has had poor experiences with Windows as a database platform for MongoDB, then that's what he's telling you about. There's no question that the StackExchange runs on Windows. But they use MSSQL, as I recall. NOT MongoDB. I'd be equally O_o if you started railing about Apache on Windows (which I've run into problems with) and comparing it to SE using Windows because they use IIS, NOT Apache. Apache was built on and most heavily tested on Linux. The Windows one is a crappy port. –  Bart Silverstrim Oct 16 '11 at 13:29
3  
I'm not saying @TomO'Connor is right or wrong with his contribution. But I am saying that you are being rather negative and offensive in your feedback awfully early into asking your question, and that the framing of your question (since it was a test install that you're running into problems with) was vague, to me, in whether it was asking about MongoDB's implementation for your project or how you wanted it repaired, so Tom's answer in advice for setup isn't necessarily bad. –  Bart Silverstrim Oct 16 '11 at 13:32
2  
It's not "bullshit" unless you prefix it with "le "... –  gWaldo Nov 3 '11 at 19:53
show 7 more comments

Not the answer you're looking for? Browse other questions tagged or ask your own question.