Relaxation oscillations of solitons