Start by reducing restore concurrency: run mongorestore --numParallelCollections=1 --numInsertionWorkersPerCollection=1 /path/to/dump. MongoDB sets collection parallelism to 4 by default, so a small VPS can start several collection restores at once. If memory still climbs beyond the VPS limit, restore fewer namespaces, defer index restoration, measure the process’s resident memory, and then choose between a slower swap-backed buffer and a larger-memory VPS.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What the out-of-memory error means
An out-of-memory failure means the restore workload needs more memory than the operating system can provide to mongorestore and the MongoDB server together. The dump’s file size is not a reliable capacity estimate. BSON records, decompression buffers, batches waiting for insertion, concurrent collection operations, and index work can make the live working set much larger than the compressed or on-disk dump.
As an Amazon Associate I earn from qualifying purchases.
An official MongoDB Jira report describes a restore of approximately 50 GB of dump data reaching as much as 76 GB of system memory. That report is an example of a high peak, not a sizing formula: the actual requirement depends on document shape, indexes, compression, storage speed, server settings, and the versions of the database tools and server.
On a VPS, the effective ceiling can be lower than the advertised RAM. The kernel, filesystem cache, monitoring agents, web services, and the MongoDB server all compete with the restore process. A command that works on a quiet 8 GB machine can be killed on the same machine while another service is handling traffic.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
The safest first command
For a constrained VPS, make both forms of restore concurrency explicit:
mongorestore
--numParallelCollections=1
--numInsertionWorkersPerCollection=1
/path/to/dump
--numParallelCollections controls how many collections can be restored in parallel and has a documented default of 4. --numInsertionWorkersPerCollection controls concurrent insert operations for each collection and has a documented default of 1. Setting both to 1 gives the smallest simultaneous workload and removes ambiguity about which kind of parallelism is being changed.
Do not assume that -j 1 expresses both settings. For a single-collection restore, MongoDB maps -j to insertion workers rather than collection parallelism. Use the long options when you need a predictable setting, especially while diagnosing memory pressure.
How mongorestore parallelism consumes memory
Collection-level concurrency
With the default value of 4, the tool may work on four collections concurrently when the dump contains multiple collections. Each active stream can have its own batches, decoding state, network buffers, and server-side work. The total is not simply four times a fixed amount, but more active streams generally mean a larger simultaneous working set.
Insertion workers within a collection
--numInsertionWorkersPerCollection sets the number of concurrent insert operations for each collection. Increasing it can improve throughput on a machine with spare CPU, storage, and memory; on a small VPS it can instead make the process hit the limit sooner. Keep it at 1 until a measured test shows that more workers are safe.
Why a single large collection can still fail
Reducing collection parallelism to 1 does not make a single collection free of memory pressure. A large collection can still require decoding, batching, network transfer, server-side allocation, and index maintenance. For that case, keep insertion workers at 1, restore only the required namespace, and consider postponing indexes.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsRank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Step-by-step recovery procedure
1. Record tool and server versions
Before changing several variables, record the versions involved:
mongorestore --version
mongosh --eval 'db.version()'
The current MongoDB Database Tools documentation lists version 100.19.1. Your installed tool may differ. Verify that the Database Tools release is compatible with the MongoDB server and that the binary you invoke is the one you intend to use. Version differences can change supported options and behavior, so keep the version information with your restore log.
2. Reduce both concurrency controls
Run the explicit low-concurrency command first:
mongorestore --numParallelCollections=1 --numInsertionWorkersPerCollection=1 /path/to/dump
If you are restoring an archive or compressed dump, add only the input-format option that matches the file, as described below. Do not raise either concurrency setting until you have observed a complete, stable restore or a representative incremental test.
3. Restore only what is required
Use a namespace filter when the VPS does not need the entire dump in one operation. To restore one collection:
Recommended Free Tools
mongorestore
--numParallelCollections=1
--numInsertionWorkersPerCollection=1
--nsInclude='app.orders'
/path/to/dump
To leave a group of collections for a later window, exclude them:
mongorestore
--numParallelCollections=1
--numInsertionWorkersPerCollection=1
--nsExclude='app.audit*'
/path/to/dump
Namespace filters reduce the amount restored in that invocation; they do not reduce the size of the original dump or eliminate memory needed by the selected collection. Quote patterns so the shell does not expand wildcard characters before mongorestore receives them.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
4. Decide whether to defer indexes
If the data must be available before all indexes are rebuilt, add --noIndexRestore:
mongorestore
--numParallelCollections=1
--numInsertionWorkersPerCollection=1
--noIndexRestore
--nsInclude='app.orders'
/path/to/dump
This option prevents index restoration during the import. It does not remove the need to create the indexes later. Plan a maintenance window, account for the additional disk and temporary workspace required by index builds, and monitor the server while those builds run. Deferring indexes trades a smaller immediate workload for a later operational task; it is not a way to avoid index cost permanently.
Free tools Windows power users keep installed
One-click scans. No signup required.
5. Match the input-format flags to the files
Use --gzip when the dump files are gzip-compressed:
mongorestore --gzip --numParallelCollections=1 --numInsertionWorkersPerCollection=1 /path/to/compressed-dump
Use --archive when the input is an archive:
mongorestore --archive=/path/to/backup.archive --numParallelCollections=1 --numInsertionWorkersPerCollection=1
These flags tell the tool how to read the input. Compression can reduce storage and transfer requirements, but neither --gzip nor --archive is a guaranteed memory fix. Decompression and archive handling still consume resources, and the restored data must still be inserted and indexed.
6. Measure memory while the restore runs
Watch both the process and the host. On a Linux VPS, one terminal can follow the process with:
pid=$(pgrep -n mongorestore)
watch -n 2 "ps -o pid,rss,vsz,%mem,etime,cmd -p $pid"
Another terminal can show host availability:
free -h
vmstat 2
Resident set size (RSS) is the useful process-level indicator for how much physical memory the restore currently occupies. Also watch the MongoDB server process and the system’s available memory. Stop unrelated jobs, scheduled backups, compilers, and other memory-heavy services for the test if you can do so safely. Record peak RSS, available memory, elapsed time, the namespace restored, and the exact flags.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
7. Choose swap or more RAM only after measuring
If the working set remains above the VPS limit after concurrency and scope are reduced, a higher-memory plan is the dependable solution. Provider-supported swap can supply a buffer for short bursts, but swap is slower than RAM and can turn memory pressure into severe I/O wait. Swap capacity and configuration are provider-specific; do not treat a swap file as equivalent to physical memory or as proof that an undersized VPS can complete any restore.
Do not resize from the dump file’s nominal size alone. Base the decision on measured peak memory under the actual dataset shape, tool and server versions, storage configuration, and provider limits.
Understanding the main fixes and their trade-offs
| Fix | Peak resident memory | Restore duration | Disk and temporary work | Risk if the process is killed |
|---|---|---|---|---|
Set --numParallelCollections=1 |
Usually lower because fewer collections are active simultaneously | Usually longer than the default of 4 | No special disk requirement beyond the dump and normal database workspace | Lower simultaneous workload, but an interrupted restore still requires verification and rerun planning |
Set --numInsertionWorkersPerCollection=1 |
Limits concurrent insert operations per collection | May increase for large collections | Generally unchanged | Lower pressure during each collection’s insert phase |
Use --nsInclude or --nsExclude |
Lower when fewer namespaces are restored in one operation | Multiple staged runs add elapsed time | Requires enough space for the selected data and any later stages | Smaller restart unit; each stage can be validated independently |
Use --noIndexRestore |
Can reduce immediate index-related pressure | Data restore is followed by a separate index-build period | Index builds still need workspace and final index storage | Applications may lack expected indexes until the planned build completes |
| Add provider-supported swap | Can absorb a short burst beyond physical RAM | Potentially much slower, with I/O wait under pressure | Consumes configured disk space | Heavy swapping can make the VPS unresponsive; it is not a substitute for sizing |
| Move to a higher-memory VPS | Raises the physical-memory ceiling | May shorten the restore if memory was the bottleneck | Depends on the new plan and storage | Lower risk of the kernel killing the process, provided the measured workload fits |
These effects are directional rather than guaranteed benchmarks. A slower disk, a different document distribution, or a different index set can change the observed result.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Incremental restore and safe tuning
When a full restore is too large for the VPS, split the work into measurable units. Start with one database or one collection, using both concurrency settings at 1. Record the peak RSS and elapsed time. Validate that the namespace contains the expected documents before moving to the next unit.
- List the databases and collections represented in the dump so you can define a sequence.
- Restore the smallest representative collection with
--numParallelCollections=1 --numInsertionWorkersPerCollection=1. - Measure peak memory for that collection and note whether indexes were restored.
- Restore the next collection or database in a separate command, keeping the same settings while you establish a baseline.
- Increase only one setting at a time, for example changing insertion workers from 1 to 2 while leaving collection parallelism at 1.
- Stop the experiment if available memory collapses, swap activity becomes sustained, latency becomes unacceptable, or the kernel begins killing processes.
Changing one variable makes the result interpretable. Raising both settings at once can hide which change caused the failure. Keep the successful command lines in your runbook so an interrupted operation can be repeated consistently.
Common symptoms and targeted responses
The VPS kills mongorestore without a clear tool error
Check the kernel and service logs for an out-of-memory kill, then inspect the recorded RSS and host availability. Re-run with both concurrency settings at 1 and a narrower namespace. If the same unit still reaches the VPS limit, measure with unrelated services stopped and plan additional memory rather than repeatedly retrying the unchanged command.
Best Value
Memory rises only when several collections start
The default collection parallelism is the likely pressure point. Set --numParallelCollections=1. Keep insertion workers at 1 until the multi-collection sequence completes reliably.
A single collection exhausts memory
Collection parallelism is already effectively one, so reduce the operation’s scope if possible, keep insertion workers at 1, and consider --noIndexRestore. A single collection can still have a large working set; a larger VPS may be required even when no parallel collections are active.
The command says the input is invalid
Confirm whether the backup is a directory of dump files, gzip-compressed files, or an archive. Add --gzip only for compressed dump files and --archive for archive input. Do not combine format flags merely as a memory experiment; use the flag that matches how the backup was produced.
The data restores but applications behave incorrectly
Check whether indexes were intentionally skipped, whether all required namespaces were included, and whether the restore completed without an interruption. If --noIndexRestore was used, schedule and monitor index creation before declaring the recovery complete. If filters were used, compare the restored namespace list with the application’s requirements.
Capacity planning checklist for a low-RAM VPS
- Record
mongorestore --versionand the MongoDB server version. - Identify whether the input is a directory, gzip-compressed dump, or archive.
- Estimate the restore scope by database and collection, not only by total dump bytes.
- Check physical RAM, currently available memory, configured swap, free disk space, and provider-enforced limits.
- Reserve headroom for the MongoDB server, the operating system, and essential services.
- Start with
--numParallelCollections=1and--numInsertionWorkersPerCollection=1. - Use namespace filters to stage the restore when the full dump is too large for one operation.
- Decide in advance whether indexes must be restored immediately or can be built during a controlled window.
- Capture peak RSS, elapsed time, and validation results for every staged run.
- Increase one concurrency setting only after the current setting is stable on a representative workload.
When upgrading the VPS is the right answer
Concurrency reduction is the first fix because it changes the simultaneous workload without changing the backup. It cannot make a fundamentally oversized restore fit indefinitely. If a single required collection, run with one insertion worker and no unnecessary indexes, still exceeds the VPS’s available memory, the practical choices are to use a machine with more RAM, stage the restore across a longer operational window, or perform the restore on a larger temporary system and then move the resulting database.
Choose based on measured peak memory rather than a universal “RAM per gigabyte of dump” rule. The documented 50 GB-to-76 GB incident demonstrates why such a rule would be misleading: dump size does not reveal the live working set. Include storage capacity and index-build workspace in the decision, and verify that the provider’s CPU, disk, swap, and process limits are sufficient for the measured workload.
Bottom line
Make restore concurrency explicit and conservative first: --numParallelCollections=1 --numInsertionWorkersPerCollection=1. Then reduce the namespace, defer indexes when the recovery plan allows it, match the input-format flags to the backup, and measure resident memory throughout the run. Swap can cushion a short burst but is slower than RAM. If the measured working set still exceeds the VPS limit, use a higher-memory environment; no fixed VPS size can be inferred from the dump’s file size alone.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

