检索大型数据库记录(〜5MB)时,PHP(或MySQL)崩溃 [英] PHP (or MySQL) crash when retrieving a big database record (~5MB)
问题描述
它不显示任何错误,只是空白页.我在调用函数以检索记录之前尝试过die('test')并完成了记录,但是当我在检索行函数之后放置die('test')时,得到的只是一个空页(on chrome it says this: Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.)
It doesnt display any errors, just a blank page. I tried die('test') before I call my function to retrieve a record and it does it, but when I place die('test') after my retrieve row function all I get is an empty page (on chrome it says this: Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.)
..我已经尝试过(使用128M,-1、64M等)
.. I have tried (with 128M, -1, 64M, etc)
ini_set('memory_limit', -1);
没有运气.我正在使用mysqli来检索记录和一个简单的查询,例如从tblBackup选择数据"(数据库中只有1条记录)
With no luck. I am using mysqli to retrieve the record and a simple query like 'Select data from tblBackup' (only 1 record in the database)
有帮助吗?
预先感谢
更新: 我跟踪了apache错误日志,并在尝试加载页面时得到了此提示,
Update: I tailed the apache error log and I get this when trying to load the page,
[Thu Jun 30 13:47:37 2011] [notice] child pid 25405 exit signal Segmentation fault (11)
推荐答案
签出php.ini变量以获取执行时间.听起来PHP可能正在超时.
Checkout php.ini variables for execution time. Sounds like PHP might be timing out.
max_execution_time =3000
max_input_time = 6000
此外,您可以在.ini级别完成此操作,但是可以添加此操作以获取PHP错误.将它们放在文件顶部:
Also, you may have this done at the .ini level, but you can add this to get the PHP error. Put these at the top of your file:
error_reporting(E_ALL);
ini_set('display_errors', '1');
这篇关于检索大型数据库记录(〜5MB)时,PHP(或MySQL)崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!