httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary W. Smith" <g...@primeexalia.com>
Subject RE: [users@httpd] Memory consumption
Date Tue, 02 Aug 2005 15:38:29 GMT
How are you reading the file in order to output it?  Some of the PHP
commands do indeed read the entire file before processing.  This would
cause the entire file to sit in ram.  I believe there are some binary
functions that only read segments at a time.  I think that is where you
problem lies.

Can you post (or send me) the relevant code segments that you use to
read the file and flush it to the client?

Gary 

> -----Original Message-----
> From: Kamil Srot [mailto:kamil.srot@nlogy.com]
> Sent: Tuesday, August 02, 2005 2:57 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] Memory consumption
> 
> Dear ALL,
> 
> Annotation:
>     my problem is, apache allocates so much memory, system wents out
of
> it and is unreachable for few minutes. I can help reporduce the
problem,
> please can someone help?
> 
> I found several similar issues in the bugreports but not exactly this
> and they are quite old and not stalled for some reason... on top I'm
not
> sure if they are really the same - I don't know apache internals so
> good...
> 
> System:
>     apache 2.0.54 (selfcompiled)
>     PHP 4.4.0 (selfcompiled as module)
>     Debian Woody with latest updates
>     (more in-depth info available on request)
> 
> Server:
>     P4 3GHz with hyperthreading active
>     2GB RAM
>     2GB swap
>     (more in-depth info available on request)
> 
> Situation:
>     I have simple PHP script serving large files for autorized
users...
> after some time, all memory of the server is consumed by httpd
processes
> - their memory allocation does corelate with size of the files
served...
> I tried to use several methods of output prom PHP, flushing of data,
> etc... it doesn't help... it seems apache does cache output of PHP
into
> RAM with NO LIMIT of memory allocation... clear and relyable way how
to
> reproduce the problem is ro resume broken download - Range headers
seems
> to make apache allocate whole output into memory immediatelly
> 
> Please can somebody help?
> 
> Thank you,
> --
> Kamil Srot
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message