Java 并行流 stream 执行15万条数据左右卡死

问题遇到的现象和发生背景

Stream 并行流执行了15万次左右电脑卡死,代码不再执行下去

用代码块功能插入代码,请勿粘贴截图
                    for(int i=0;iif(i<(step-1)){
                            System.out.println("notStock正在执行第"+(i*rows)+"到"+((i+1)*rows)+"条记录写入至表格");
                            List attoItemsList = attoItemsServiceCom.AttoItems_notStock((i*rows),((i+1)*rows));
                            attoItemsList.parallelStream()
                                    .forEach(z->{
                                        z.setPurity(Purity(z.getSupplierProductID()));
                                        z.setStockStatus("");
                                        "数据库单条插入方法";
                                        System.out.println(z);
                                    });
                            }else {
                            System.out.println("notStock正在执行第"+(i*rows)+"到"+count+"条记录写入至表格");
                            List attoItemsList = attoItemsServiceCom.AttoItems_notStock((i*rows),count);
                            attoItemsList.parallelStream()
                                    .forEach(z->{
                                        z.setPurity(Purity(z.getSupplierProductID()));
                                        z.setStockStatus("");
                                        "数据库单条插入方法";
                                        System.out.println(z);
                                    });
           }
运行结果及报错内容

没有报错,但是卡着不动了(控制台没有任何输出)

我的解答思路和尝试过的方法

尝试在每个stream流forEach后,让暂停5秒后执行

我想要达到的结果

能达到百万条数据库插入语句完全插入中途不死机,不出错