douhuan1937 2012-05-14 16:15 采纳率: 0%
浏览 28

带有Smarty模板和自定义修饰符的PHP脚本会无声地死掉

I have written a Smarty modifier that uses the PHP Simple HTML DOM parser class (http://simplehtmldom.sourceforge.net/) to clean-up and convert some HTML that's stored in an Oracle DB table. The PHP script queries the DB, gets the results in an array, assigns the array to a Smarty variable, and then the template iterates over the results in the array, applying the modifier to each and every one of them.

When the number of elements in the array is big (around 3000) the whole script dies silently after about 2 minutes, with no errors, warning or anything logged anywhere (checked PHP and Apache logs). In fact, it seems to die while still processing and outputing the response, and it dies in slightly different points every time.

I have set all PHP and Apache config parameters to very high limits, e.g. max_execution_time = 600, memory_limit = 512M, etc.

I suspect it may have to do with a browser timeout (using Firefox 12 and IE 8, can't test with other browsers in our work environment), but I couldn't find any information on how to change this setting. I tried setting in Firefox the property network.http.keep-alive.timeout to 300 (it was 115, suspiciously close to 2 minutes), but it didn't help.

Any ideas?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 关于大棚监测的pcb板设计
    • ¥15 stm32开发clion时遇到的编译问题
    • ¥15 lna设计 源简并电感型共源放大器
    • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
    • ¥15 Vue3地图和异步函数使用