0

I have a C script that parse some data and put the data into mongodb using mongoc driver. The script use multithreading to open 3 threads at the same time. The very first time it worked without problem, but somehow I lost data and had to rerun the script again. This time it crashed the whole server and I had to reboot the server. When server is back online, I noticed there is unclean mongod.lock file in dpath so I run repair command and it crashes again. I also tried to start mongod and it crashes as well if I set dpath to previous dpath (not crash if i set to some other dpath).

I am so confused that I don't know that what's wrong here and how potentially can I fix it?

dome some
  • 479
  • 7
  • 22
  • Can you clarify "it crashes again". Does mongod crash or the whole machine crashes? What version of mongodb? Are you using journaling? – helmy Apr 11 '17 at 17:35
  • the whole server crashes, all crash refer to server crash. version 3.4.1 which i think is a stable version with even number. yes i have WiredTiger files in my dpath – dome some Apr 11 '17 at 17:38
  • If you're using a YAML config file, do you have ``storage.journal.enabled`` set to false? Or a ``--nojournal`` command line parameter, or ``nojournal`` set if using the old config file format? – helmy Apr 11 '17 at 17:43
  • i dont have --nojournal in my command line, does it cause the problem here? – dome some Apr 11 '17 at 17:44
  • Delete the files in your dbpath and try again? Try running your client on a separate machine? Have you checked for stack traces in the mongod log file? – helmy Apr 11 '17 at 18:10
  • yes i have checked mongod.log files they dont show any crashing information. I will give it a try – dome some Apr 11 '17 at 18:16
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/141454/discussion-between-zixuan-zhang-and-helmy). – dome some Apr 11 '17 at 18:24

0 Answers0