Jump to content

MySQL Query Timeout?


andygrant

Recommended Posts

Hi

 

I'm executing a MySQL query and its getting data from two linked tables that have around 4500 and 7500 rows. My query should return about 4500 results but it seems to be timing out. When loading the page in IE it just gives a page cannot be found and Firefox shows a Popup asking if i want to open the file in Dreamweaver or save the file.

 

If i alter the quert slightly so it only returns 200-300 results it works fine.

 

The results are actually seperated onto 25 per page but it still wont work. Even when only select COUNT(*) it doesn't work. Is there a limit to the amount of results that can be returned. Looking in phpMyAdmin the size of the tables are 250-300kb in size.

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/129567-mysql-query-timeout/
Share on other sites

It is common for large queries to cause PHP scripts to exceed their memory limits.

 

What errors are being reported?

 

To ensure all errors are reported in the php.ini file set:

display_errors = On

track_errors = On

html_errors = On

log_errors = On

error_log = /var/tmp/error.log

NOTE: On a production server you don't want to report back errors to potential hackers so there just log errors!

 

To increase the memory limit in the php.ini file set:

memory_limit = 128M ; Maximum amount of memory a script may consume (default 8M)

 

Paul D.

Link to comment
https://forums.phpfreaks.com/topic/129567-mysql-query-timeout/#findComment-672911
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.