Restart/interruption petsc

I would assume that this is due to the fact that you recreate your PETSc solver in a loop.
However, as you have not supplied a minimal working example, I cannot help you much further.
See: Read before posting: How do I get my question answered? - #2 on information about how to create a minimal working example.