httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Holthaus - Orange XL" <i...@orangexl.com>
Subject RE: [users@httpd] Apache 2 + PHP5 + broken script = memory exhaustion
Date Wed, 09 Feb 2005 04:01:36 GMT
> On Tuesday 08 February 2005 03:24, Sander Holthaus - Orange XL wrote:
> 
> > Out of memory during "large" request for 134221824 bytes, 
> total sbrk() 
> > is 134369280 bytes.
> 
> That looks like an underlying attempt to allocate (some 
> uninitialised var) number of bytes.  Which looks much more 
> like brokenness in PHP itself than in some scripts.  But of 
> course, ICBW.

Perhaps both. Will try to recompile PHP to 5.03h (Hardened PHP) and see if
it make any difference.
 
> >  But still, how can an php-script cause so many problems, basically 
> > dos'ing the box?
> 
> A simple program:
> int main() {
>   while (1) {
>     void* x = malloc(12345) ;
>   }
>   return 0;
> }
> will DOS any machine it runs on, unless the underlying OS 
> protects itself (e.g. with ulimit on unix/linux family boxes).

Using FreeBSD, so I should be able to set some limits (they can be set
easily through rc.conf if installing from ports). Actually, I already took a
look at it quite a while ago, but I'm not quite sure what are reasonable /
sensible settings and how they scale.
Quite awkwerd that they are not mention in books like Apache: Definitive
Guide or in the Apache Cookbook.

Kind Regards,
Sander Holthaus


---------------------------------------------------------------------
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