Connection reset by Peer pymongo
问题 I have some documents which I have to fetch from mongodb and set it to memcache. Here is the code import memcache from pymongo import MongoClient db = mongo_client.job_db.JobParsedData jobs = db.find().sort("JobId", 1) def set_to_memcache_raw(jobs): print("Setting raw message to memcache") count = 0 for item in jobs: job_id = item.get('JobId') job_details = item.get('JobDetails') if job_id.strip(): count += 1 memcache_obj.set(job_id, job_details, time=72000) if count % 1000 == 0: print(