【问题标题】:Long-time execution php script reset after 30 sec长时间执行 php 脚本在 30 秒后重置
【发布时间】:2015-03-01 15:35:37
【问题描述】:

我有一个 php 脚本,它涉及到我的 mysql 数据库的大量工作,因为它应该生成一个学校时间表,但是在 exec 大约 30-40 秒后,它被重置,其他 30-40 秒后我的浏览器向我显示消息:

此网页不可用。

我尝试了我在互联网上找到的所有方法(php.ini - max_execution_timeset_time_limit(0)ini_set('max_execution_time', 10)),甚至更改了 apache 的超时,但我的脚本仍然被重置。有什么想法吗?

编辑

[01-Mar-2015 15:30:16 UTC] PHP Warning:  PHP Startup: Unable to load dynamic    library 'E:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

in Unknown on line 0

[01-Mar-2015 15:30:16 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'E:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

in Unknown on line 0

[01-Mar-2015 15:30:17 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'E:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

 in Unknown on line 0

[01-Mar-2015 15:30:17 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'E:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.

这是我的 php 错误日志,重置后。它会以任何方式影响我的脚本吗?

【问题讨论】:

  • 也许是关于内存的。尝试增加你的内存限制可能吗? ini_set('memory_limit', '64M');
  • 已经设置为512M,以防万一..
  • 要确定问题究竟是什么,请查看 Apache 错误日志和 PHP 错误日志。如果是超时,我希望在其中一个日志文件中看到一条消息,如果您没有看到超时消息,那么它很可能不是超时问题。

标签: php apache timeout wamp


【解决方案1】:

首先,php错误日志中的那些错误消息可能与这个问题无关,但可以通过这样做来解决。

left click on the wampmanager icon in the system tray
wampmanager->Apache->Version->2.4.9 ( click on the 2.4.9 version number )

这将导致 wampmanager 重建 \apache2.4.9\bin 文件夹中的所有 SYMLINKS。

【讨论】:

  • 这可能来自我用来构建计划的查询数量吗?我使用非常多的查询,比如 1000 直到脚本停止工作。现在的问题是脚本运行了一段时间,给我展示了一部分结果,它还在加载,但是数据库不再修改
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-05-02
  • 1970-01-01
  • 1970-01-01
  • 2011-09-24
  • 1970-01-01
  • 2011-01-08
相关资源
最近更新 更多