Re: memory limit exceeded
| From: | Hans H. Anderson | Date: | Thu, 20 Jul 2000 05:15:14 +0000 |
| Subject: | Re: memory limit exceeded | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7378@lists.php.net to get a copy of this message | ||
Gunjan,
So it sounds as though it's choking on the query... the query takes too
long and the maximum time is exceeded. This could be a database problem,
too. You can get around it by using the set_time_limit(0) command at the
top of the script, but it doesn't really cover the problem.
Check out your database, make sure you are querying it properly. If you
are using MySQL, check out the "explain" syntax, it's helped me a bunch
when I've really needed to optimize queries.
If it just turns out the script needs all the data, and it just plain
takes awhile to get it, you could try the set_time_limit command and
output some HTML telling users to be patient.
I'm going on vacation in about 4 hours, so I probably won't be able to
help any longer. Sorry.
Hans
On Thu, 20 Jul 2000, Gunjan Kapoor wrote:
>
> Hi,
> I'll try to explain the problem more clearly. I don't suppose you'd need
> the script, but if you do, please let me know. I really want to know
> what's going on.
>
> step 1: execute script so that it retrieves 2 yr data. Execution
> successful.
>
> step 2: execute script so that it retrieves 2 yr data. Execution
> successful.
>
> step 3: execute script so that it retrieves 7 yr data. Execution
> fails -- memory_limit exceeded.
>
> step 4: execute script so that it retrieves 2 yr data. Execution
> fails -- memory_limit exceeded.
>
> step 5: execute script so that it retrieves 1 day data. Execution
> fails -- memory_limit exceeded.
>
>
>
>
> > Gunjan,
> >
> > There are so many things that could be going on that I cannot possibly
> > account for them all without a little more to go on. Can you narrow it
> > down by sending a script, or a part of one?
>
>
>
Hans Anderson ~ me@hansanderson.com
PO Box 426, Missoula, MT 59806 | PHP, Search Engines, SQL
(800)397-9116 / (406)549-6524 | Databases, Flash Multimedia,
http://www.hansanderson.com | Killer Audio Production,
http://www.goofiness.com | Minty Fresh Breath.