You have a couple of quick options:
1. If this is a one-time import, just split the file into multiple
parts and run them in sequence. The JS shell may indeed have a memory
leak (or it may just have a different max process size).
2. If you plan to run this import regularly you can:
a. Use a driver from a different language (Ruby, Python, PHP, etc)
b. Try the "mongoimport" utility. It's usually pretty easy to export
to CSV or TSV from any RDBMS. The MongoImport will bring them in for
you. Just remember to rename the "ID" column in your file to "_id" if
you want to keep your old IDs.
MongoImport link below:
http://www.mongodb.org/display/DOCS/Import+Export+Tools#ImportExportTools-mongoimport