diff -Naur nginx-0.7.1/src/core/nginx.c nginx-0.7.1-mine/src/core/nginx.c
--- nginx-0.7.1/src/core/nginx.c	2008-05-22 14:09:41.000000000 +0200
+++ nginx-0.7.1-mine/src/core/nginx.c	2008-05-30 16:47:52.000000000 +0200
@@ -115,6 +115,13 @@
       offsetof(ngx_core_conf_t, rlimit_core),
       NULL },
 
+    { ngx_string("worker_rlimit_fsize"),
+      NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1,
+      ngx_conf_set_size_slot,
+      0,
+      offsetof(ngx_core_conf_t, rlimit_fsize),
+      NULL },
+
     { ngx_string("worker_rlimit_sigpending"),
       NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1,
       ngx_conf_set_num_slot,
@@ -733,6 +740,7 @@
 
     ccf->rlimit_nofile = NGX_CONF_UNSET;
     ccf->rlimit_core = NGX_CONF_UNSET_SIZE;
+    ccf->rlimit_fsize = NGX_CONF_UNSET_SIZE;
     ccf->rlimit_sigpending = NGX_CONF_UNSET;
 
     ccf->user = (ngx_uid_t) NGX_CONF_UNSET_UINT;
diff -Naur nginx-0.7.1/src/core/ngx_cycle.h nginx-0.7.1-mine/src/core/ngx_cycle.h
--- nginx-0.7.1/src/core/ngx_cycle.h	2008-05-16 16:39:06.000000000 +0200
+++ nginx-0.7.1-mine/src/core/ngx_cycle.h	2008-05-30 16:48:37.000000000 +0200
@@ -78,6 +78,7 @@
      ngx_int_t                rlimit_nofile;
      ngx_int_t                rlimit_sigpending;
      size_t                   rlimit_core;
+     size_t                   rlimit_fsize;
 
      int                      priority;
 
diff -Naur nginx-0.7.1/src/os/unix/ngx_process_cycle.c nginx-0.7.1-mine/src/os/unix/ngx_process_cycle.c
--- nginx-0.7.1/src/os/unix/ngx_process_cycle.c	2008-05-25 20:27:38.000000000 +0200
+++ nginx-0.7.1-mine/src/os/unix/ngx_process_cycle.c	2008-05-30 16:54:30.000000000 +0200
@@ -841,6 +841,17 @@
         }
     }
 
+    if (ccf->rlimit_fsize != NGX_CONF_UNSET_SIZE) {
+        rlmt.rlim_cur = (rlim_t) ccf->rlimit_fsize;
+        rlmt.rlim_max = (rlim_t) ccf->rlimit_fsize;
+
+        if (setrlimit(RLIMIT_FSIZE, &rlmt) == -1) {
+            ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
+                          "setrlimit(RLIMIT_FSIZE, %i) failed",
+                          ccf->rlimit_fsize);
+        }
+    }
+
 #ifdef RLIMIT_SIGPENDING
     if (ccf->rlimit_sigpending != NGX_CONF_UNSET) {
         rlmt.rlim_cur = (rlim_t) ccf->rlimit_sigpending;