Render multiple images with preview

I need to make simple script for creating set of images to compile a 360 degrees panorama. So i need to render image - rotate camera - render image - rotate camera - render etc. I want to preview rendering images and here is a problem:
Render does not start for a second time.
Script renders first image, rotate camera and stops.
In console window i see:
render start
saved image
render finished
scene update
render start

and nothing more. No errors.
Script stops on
bpy.ops.render.render(‘INVOKE_DEFAULT’, write_still=True)

If i use
my code works correct but without preview.

Here is my code:

import bpy
from bpy import context
from import persistent

def onrenderfinished(scene):

    print('render finished')
    sceneupdateposthadler =
    if onsceneupdatepost not in sceneupdateposthadler:
    return {'FINISHED'}

def onsceneupdatepost(scene):

    print('scene update')
    if Panorama360.CurrentPoint < len(Panorama360.TargetPoints):
        Panorama360.CurrentPoint = Panorama360.CurrentPoint + 1
        Panorama360.CurrentPoint = 0
    return {'FINISHED'}

class Panorama360(bpy.types.Operator):
    bl_idname = "render.panorama360"
    bl_label = "Panorama360"
    TargetPoints = []
    CurrentPoint = 0

    def execute(self, context):
        PanoramaPointer =['PanoramaPointsSphere']
        Panorama360.TargetPoints = [(PanoramaPointer.matrix_world * for v in]
        return {'FINISHED'}

    def RenderToCurrentPoint(self):
        CameraTarget =['CameraTarget']
        CameraTarget.location = Panorama360.TargetPoints[Panorama360.CurrentPoint]
        rendercompletehadler =
        if onrenderfinished not in rendercompletehadler:
        rendercancelhadler =
        if onrenderfinished not in rendercancelhadler:

        print('render start')
["Scene"].render.filepath = '//_%d.jpg' % Panorama360.CurrentPoint
#        bpy.ops.render.render(write_still=True)
        bpy.ops.render.render('INVOKE_DEFAULT', write_still=True)
        return {'FINISHED'}

I found that if i set big resolution to final render (in render - dimensions - resolution): 2300x2300 and more, script works fine and doesnt stop on second frame. If resolution is less than 2300x2300 - script stop after first render.
Is it any restrictions on render with ‘INVOKE_DEFAULT’ ?
May be render time or some else?