If you use this patch, you had better recompile your libc and apache.
If you don't understand why then don't use the patch, wait for a full
release of linux 2.2.

Dean

*** linux/include/linux/fs.h.dist	Mon Dec 23 04:56:58 1996
--- linux/include/linux/fs.h	Mon Dec 23 04:58:29 1996
***************
*** 27,33 ****
  
  /* Fixed constants first: */
  #undef NR_OPEN
! #define NR_OPEN 256
  
  #define NR_SUPER 64
  #define BLOCK_SIZE 1024
--- 27,33 ----
  
  /* Fixed constants first: */
  #undef NR_OPEN
! #define NR_OPEN 1024
  
  #define NR_SUPER 64
  #define BLOCK_SIZE 1024
***************
*** 37,43 ****
  extern int max_inodes, nr_inodes;
  extern int max_files, nr_files;
  #define NR_INODE 3072	/* this should be bigger than NR_FILE */
! #define NR_FILE 1024	/* this can well be larger on a larger system */
  
  #define MAY_EXEC 1
  #define MAY_WRITE 2
--- 37,43 ----
  extern int max_inodes, nr_inodes;
  extern int max_files, nr_files;
  #define NR_INODE 3072	/* this should be bigger than NR_FILE */
! #define NR_FILE 2048	/* this can well be larger on a larger system */
  
  #define MAY_EXEC 1
  #define MAY_WRITE 2
*** linux/include/linux/limits.h.dist	Mon Dec 23 04:58:41 1996
--- linux/include/linux/limits.h	Mon Dec 23 04:59:26 1996
***************
*** 1,12 ****
  #ifndef _LINUX_LIMITS_H
  #define _LINUX_LIMITS_H
  
! #define NR_OPEN		 256
  
  #define NGROUPS_MAX       32	/* supplemental group IDs are available */
  #define ARG_MAX       131072	/* # bytes of args + environ for exec() */
  #define CHILD_MAX        999    /* no limit :-) */
! #define OPEN_MAX         256	/* # open files a process may have */
  #define LINK_MAX         127	/* # links a file may have */
  #define MAX_CANON        255	/* size of the canonical input queue */
  #define MAX_INPUT        255	/* size of the type-ahead buffer */
--- 1,12 ----
  #ifndef _LINUX_LIMITS_H
  #define _LINUX_LIMITS_H
  
! #define NR_OPEN		1024
  
  #define NGROUPS_MAX       32	/* supplemental group IDs are available */
  #define ARG_MAX       131072	/* # bytes of args + environ for exec() */
  #define CHILD_MAX        999    /* no limit :-) */
! #define OPEN_MAX        1024	/* # open files a process may have */
  #define LINK_MAX         127	/* # links a file may have */
  #define MAX_CANON        255	/* size of the canonical input queue */
  #define MAX_INPUT        255	/* size of the type-ahead buffer */
*** linux/include/asm-i386/resource.h.dist	Mon Dec 23 05:00:23 1996
--- linux/include/asm-i386/resource.h	Mon Dec 23 05:01:21 1996
***************
*** 20,25 ****
--- 20,33 ----
  
  #ifdef __KERNEL__
  
+ /* because most programs are linked with an fd_set of only 256 we have to
+     be careful */
+ #if NR_OPEN > 256
+ #define INIT_NR_OPEN 256
+ #else
+ #define INIT_NR_OPEN NR_OPEN
+ #endif
+ 
  #define INIT_RLIMITS					\
  {							\
  	{ LONG_MAX, LONG_MAX },				\
***************
*** 29,35 ****
  	{        0, LONG_MAX },				\
  	{ LONG_MAX, LONG_MAX },				\
  	{ MAX_TASKS_PER_USER, MAX_TASKS_PER_USER },	\
! 	{ NR_OPEN, NR_OPEN },				\
  	{ LONG_MAX, LONG_MAX },				\
  	{ LONG_MAX, LONG_MAX },				\
  }
--- 37,43 ----
  	{        0, LONG_MAX },				\
  	{ LONG_MAX, LONG_MAX },				\
  	{ MAX_TASKS_PER_USER, MAX_TASKS_PER_USER },	\
! 	{ INIT_NR_OPEN, NR_OPEN },			\
  	{ LONG_MAX, LONG_MAX },				\
  	{ LONG_MAX, LONG_MAX },				\
  }
