Home » Performance » MySQL » mysql stops processing suddenly, no error
mysql stops processing suddenly, no error [message #1759] Fri, 07 September 2007 14:50 Go to previous message
bluem  is currently offline bluem
Messages: 15
Registered: November 2006
Junior Member
I have a PHP script that queries the database for a fairly large number of rows, using mysql_query(), then runs through those rows and stores them in PHP array using mysql_fetch_array() for each row. The script does nothing else during the loop, just data storage in an array. For example, on 15,000 rows, it will loop for about 8000 rows, then all processing stops. The server returns a blank page, no time out warning, nothing, just says "Done" in the status bar at bottom of browser.

After loading the array, the script uses in the information for further processing ... but of course the script doesn't get to that point.

However, if I instead use mysql_fetch_array() to get one row, then do some PHP processing on that row, THEN get the next row, etc, instead of immediately storing everything into an array first, then it works.

What could be causing the termination? Is it calling mysql too fast during the loop? Is there a mysql memory problem? I doubt it's a PHP limitation on array size. It's also not a PHP timeout issue; it quits long before that (I've checked).

I'm using XAMPP on Windows, by the way; however, I've seen a similar thing on my live linux server when doing large queries, where the server returns a blank "Done" page.

Thanks for any advice. I have to say this forum is a life-saver.

Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Can't change key_buffer_size
Next Topic:MERGE and indexes
Goto Forum:

  


Current Time: Sun Jul 5 22:26:59 EDT 2009

Total time taken to generate the page: 0.00993 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.