PHP (or MySQL) crashes while retrieving a large database record (~ 5 MB)

It does not display any errors, just a blank page. I tried to die ("test") before I call my function to get the record, and it does it, but when I put die ("test") after my extract string function, all I get is a blank page (on chrome it says this: Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.)

.. I tried (with 128M, -1, 64M, etc.)

 ini_set('memory_limit', -1); 

Bad luck. I use mysqli to retrieve a record and a simple query like "Select data from tblBackup" (only 1 record in the database)

Any help?

Thank you in advance

Update: I linked the apache error log and I get this when I try to load the page,

 [Thu Jun 30 13:47:37 2011] [notice] child pid 25405 exit signal Segmentation fault (11) 
+4
source share
4 answers

Check php.ini variables for runtime. It looks like PHP might be disabled.

 max_execution_time =3000 max_input_time = 6000 

It can also be done at the .ini level, but you can add this to get a PHP error. Put them at the beginning of the file:

 error_reporting(E_ALL); ini_set('display_errors', '1'); 
+2
source

What are the client and server options for max_allowed_packet ? If it is smaller than the blob ~ 5MB that you are trying to transfer, the connection will be killed.

+1
source

Well, there was a man there. But at the end of the day: Is this a good way to handle the request? If you have many results, LIMIT them. Paginated perhaps?

Because yes, you can set limits higher, but in the longer term .. is this really the most effective way?

0
source

During php compilation, my flag --with-pdo-mysql = [DIR] seemed to be causing the problem. I deleted [DIR] and left it blank. The problem has disappeared.

0
source

All Articles