Bug#485413: apache2/lenny/amd64 eats up all RAM
Trying with the attached patch now.
Let’s see whether this helps to work around the problem.
bye,
//mirabilos
--
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 52675-25
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Boris Esser, Elmar Geese
diff -u apache2-2.2.9/debian/apache2.2-common.apache2.default apache2-2.2.9/debian/apache2.2-common.apache2.default
--- apache2-2.2.9/debian/apache2.2-common.apache2.default
+++ apache2-2.2.9/debian/apache2.2-common.apache2.default
@@ -1,3 +1,10 @@
+### apache2 settings ###
+
+## uncomment this to change the datasize ulimit
+## commented out means do not set it at all
+## otherwise this is the ulimit in Kibibytes
+#APACHE2_DATASIZE=262144
+
### htcacheclean settings ###
## run htcacheclean: yes, no, auto
diff -u apache2-2.2.9/debian/changelog apache2-2.2.9/debian/changelog
--- apache2-2.2.9/debian/changelog
+++ apache2-2.2.9/debian/changelog
@@ -1,3 +1,9 @@
+apache2 (2.2.9-10+lenny9.0tarent1) local; urgency=low
+
+ * Allow setting the datasize ulimit for the Apache 2 Web Server
+
+ -- Thorsten Glaser <t.glaser@tarent.de> Thu, 11 Aug 2011 13:09:19 +0200
+
apache2 (2.2.9-10+lenny9) stable-security; urgency=high
* Add the new SSLInsecureRenegotiation directive to configure if clients
diff -u apache2-2.2.9/debian/apache2.2-common.apache2.init apache2-2.2.9/debian/apache2.2-common.apache2.init
--- apache2-2.2.9/debian/apache2.2-common.apache2.init
+++ apache2-2.2.9/debian/apache2.2-common.apache2.init
@@ -18,6 +18,7 @@
#echo "To add and enable a host, use addhost and enhost." && exit 0
#edit /etc/default/apache2 to change this.
+APACHE2_DATASIZE=""
HTCACHECLEAN_RUN=auto
HTCACHECLEAN_MODE=daemon
HTCACHECLEAN_SIZE=300M
@@ -148,7 +149,11 @@
case $1 in
start)
log_daemon_msg "Starting web server" "apache2"
- if $APACHE2CTL start; then
+ if (
+ test -n "$APACHE2_DATASIZE" && \
+ ulimit -d "$APACHE2_DATASIZE"
+ exec $APACHE2CTL start
+ ); then
if check_htcacheclean ; then
log_progress_msg htcacheclean
start_htcacheclean || log_end_msg 1
Reply to: