Error: Unexpected error while saving file, database disk image is malformed

I am getting this error database disk image is malformed, after I use the notebook for a while and when I try to save it after I make some changes in it.
The notebook uses libraries like pandas, numpy, matplotlib and seaborn but I had not faced this kind of issue in my earlier notebooks.
This eventually doesn’t let me to save my changes and autosave option fails.
“The history saving thread hit an unexpected error (DatabaseError(‘database disk image is malformed’)).History will not be written to the database.”

I get the above error the moment I run the first cell in my notebook.

Is this something to do with the Jupyter Notebook or system configuration??
How can I get rid of this issue? Request your help in solving this issue.