I've looked at other solutions to this, such as:
But still have this error. I'm trying to load a large GeoJSON file into MongoDB.
Here's my code: https://gist.github.com/mittenchops/6499844
using the iterative json parser here: https://github.com/isagalaev/ijson
Here is my error:
Traceback (most recent call last):
File "upload2mongo.py", line 57, in <module>
main(sys.argv)
File "upload2mongo.py", line 52, in main
loader(renamesh2json(argv[1]), argv[2])
File "upload2mongo.py", line 22, in loader
db[collection].insert(d)
File "/usr/local/lib/python2.7/dist-packages/pymongo/collection.py", line 359, in insert
continue_on_error, self.__uuid_subtype), safe)
File "/usr/local/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 853, in _send_message
raise AutoReconnect(str(e))
pymongo.errors.AutoReconnect: [Errno 104] Connection reset by peer
Why am I receiving this strange error about my connection shutting down?