1

I have had the mongod.log file of more than 10 GBs, so I deleted it. However, since then the file has not been recreated - did I mess it up by deleting the file? How to fix that?

1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Commented Oct 16, 2023 at 10:10

1 Answer 1

0

It seems like mogodb does not like that, in fact many applications dont. In the future you should either do it the correct way witch is to use the mongodb logrotate directive

OR, you can usually get away with truncating the logfile sudo echo "" > /path/to/logfile.log This empties the file content but leaves evrything else as is (more on truncate).

It should fix itself if you restart.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .