我在使用XAMPP Apache运行的PHP脚本时遇到问题。脚本运行没有错误,需要无限重复。有时脚本运行完美100次,有时20次,有时只运行5次。但是,总会出现这样的情况,即Apache将终止脚本,错误是#34;终止(#)未能退出的线程。"。然后我必须手动重启脚本。
有谁有想法,我怎么能解决这个问题?
升级机器后发生错误。在我的旧机器上,脚本运行时没有出现此错误。
配置或安装版本没有差异。新机器有更多的RAM,CPU和空间。
运行脚本时有足够的可用RAM,CPU和空间。
这是Apache日志(它总是这样):
[Tue Sep 27 14:36:01.748279 2016] [mpm_winnt:notice] [pid 10664:tid 268] AH00354: Child: Starting 250 worker threads.
[Tue Sep 27 14:36:31.886002 2016] [mpm_winnt:notice] [pid 12924:tid 268] AH00362: Child: Waiting 270 more seconds for 2 worker threads to finish.
[Tue Sep 27 14:37:01.919720 2016] [mpm_winnt:notice] [pid 12924:tid 268] AH00362: Child: Waiting 240 more seconds for 2 worker threads to finish.
[Tue Sep 27 14:37:32.041443 2016] [mpm_winnt:notice] [pid 12924:tid 268] AH00362: Child: Waiting 210 more seconds for 2 worker threads to finish.
[Tue Sep 27 14:38:02.114163 2016] [mpm_winnt:notice] [pid 12924:tid 268] AH00362: Child: Waiting 180 more seconds for 2 worker threads to finish.
[Tue Sep 27 14:38:32.131880 2016] [mpm_winnt:notice] [pid 12924:tid 268] AH00362: Child: Waiting 150 more seconds for 2 worker threads to finish.
[Tue Sep 27 14:39:02.139596 2016] [mpm_winnt:notice] [pid 12924:tid 268] AH00362: Child: Waiting 120 more seconds for 2 worker threads to finish.
[Tue Sep 27 14:39:32.203316 2016] [mpm_winnt:notice] [pid 12924:tid 268] AH00362: Child: Waiting 90 more seconds for 2 worker threads to finish.
[Tue Sep 27 14:40:02.254035 2016] [mpm_winnt:notice] [pid 12924:tid 268] AH00362: Child: Waiting 60 more seconds for 2 worker threads to finish.
[Tue Sep 27 14:40:32.326755 2016] [mpm_winnt:notice] [pid 12924:tid 268] AH00362: Child: Waiting 30 more seconds for 2 worker threads to finish.
[Tue Sep 27 14:41:02.393475 2016] [mpm_winnt:notice] [pid 12924:tid 268] AH00362: Child: Waiting 0 more seconds for 2 worker threads to finish.
[Tue Sep 27 14:41:02.493480 2016] [mpm_winnt:notice] [pid 12924:tid 268] AH00363: Child: Terminating 2 threads that failed to exit.
[Tue Sep 27 14:41:02.493480 2016] [mpm_winnt:notice] [pid 12924:tid 268] AH00364: Child: All worker threads have exited.
我试图改变工作线程的数量,从200到2000,总是相同的结果。
有没有办法增加Apache"等待工作线程完成的时间?#34;?
提前致谢
编辑: 我有一个本地MySQL数据库,带有用于onlineshop的productdata。该脚本刷新产品信息并创建CSV文件以进行上传。