Re: running out of memory processing result set on Linux, but not on Solaris

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 13, 2010 at 11:06 AM, Larry Martell <larry@xxxxxxxxxxxxxxxxxxxxx
> wrote:

> I have an app that runs just fine on an older Solaris apache server
> (Apache/2.0.53 PHP/5.0.4), but when I run the same app on a newer
> Linux server (Apache/2.2.3-11 PHP/5.2.8) against the same database on
> the same mysql server, it fails with "Allowed memory size exhausted".
> This occurs on a:
>
> $result = mysql_query($query, $db)
>
> statement. Both servers are running the identical query, which returns
> a result set under 0.5M. The Solaris server is configured with
> memory_limit = 8M in php.ini, and the Linux one with 32M, so clearly
> something other then what I'm seeing is going on. Anyone know what
> could be causing this? Any php or apache build or config options that
> I could look at?
>

are you sure the app doesnt have some other data loaded into memory before
running the query on the linux box?

you can use memory_get_usage() right before executing the query on the linux
box to determine if thats the case.

for example suppose the query takes .5M of memory, when you run it on the
solaris box only 4M of memory is currently in use and when you run it on the
linux box 31.7M of memory is in use.

another easy way to make the determination is to do as ashley suggested and
write a script which does nothing other than execute the query.

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux