It's because you are using catalog_product_save_after
. so on product save you are again saving and again this evenevent called so bottleneck happen. I would suggest to use different event. or Use catalog_product_save_before
event and just set the $_product->setSku("testNew1");
and not save $product
object.