* /proc/sys/fs/file-max broken in 2.4.22-pre5
@ 2003-07-13 22:31 Andrew Burgess
2003-07-14 7:16 ` Willy Tarreau
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Burgess @ 2003-07-13 22:31 UTC (permalink / raw)
To: linux-kernel
Setting /proc/sys/fs/file-max to 60000 results in a max of 1024 file
handles. In 2.4.21-rc7-ac1 and random earlier kernels this works as expected.
---------------------------------------------------------------------------
root@athlon:/root # cat file-max.c
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
main() {
int i = 0;
struct rlimit r;
getrlimit(RLIMIT_NOFILE, &r);
r.rlim_cur = 50000;
setrlimit(RLIMIT_NOFILE, &r);
while(1) {
if(fopen("/tmp/file-max-test", "w") == 0) {
perror("");
break;
}
i++;
}
printf("opened %d files\n", i);
}
root@athlon:/root # echo 60000 > /proc/sys/fs/file-max
root@athlon:/root # cc file-max.c
root@athlon:/root # a.out
Too many open files
opened 1021 files
root@athlon:/root # uname -a
Linux athlon 2.4.22-pre5 #2 SMP Sun Jul 13 12:38:04 PDT 2003 i686 unknown
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: /proc/sys/fs/file-max broken in 2.4.22-pre5
2003-07-13 22:31 /proc/sys/fs/file-max broken in 2.4.22-pre5 Andrew Burgess
@ 2003-07-14 7:16 ` Willy Tarreau
0 siblings, 0 replies; 3+ messages in thread
From: Willy Tarreau @ 2003-07-14 7:16 UTC (permalink / raw)
To: Andrew Burgess; +Cc: linux-kernel
On Sun, Jul 13, 2003 at 03:31:54PM -0700, Andrew Burgess wrote:
> root@athlon:/root # echo 60000 > /proc/sys/fs/file-max
> root@athlon:/root # cc file-max.c
> root@athlon:/root # a.out
> Too many open files
> opened 1021 files
> root@athlon:/root # uname -a
> Linux athlon 2.4.22-pre5 #2 SMP Sun Jul 13 12:38:04 PDT 2003 i686 unknown
ulimit -n ?
Willy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: /proc/sys/fs/file-max broken in 2.4.22-pre5
@ 2003-07-14 20:11 Andrew Burgess
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Burgess @ 2003-07-14 20:11 UTC (permalink / raw)
To: linux-kernel
Willy wrote:
>On Sun, Jul 13, 2003 at 03:31:54PM -0700, Andrew Burgess wrote:
>
>> root@athlon:/root # echo 60000 > /proc/sys/fs/file-max
>> root@athlon:/root # cc file-max.c
>> root@athlon:/root # a.out
>> Too many open files
>> opened 1021 files
>> root@athlon:/root # uname -a
>> Linux athlon 2.4.22-pre5 #2 SMP Sun Jul 13 12:38:04 PDT 2003 i686 unknown
>
>ulimit -n ?
It works without ulimit on earlier kernels but sure enough this
fixed it on 22-pre5. Thank you!
I assume ignoring ulimit was a bug that is now fixed?
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-07-14 19:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-13 22:31 /proc/sys/fs/file-max broken in 2.4.22-pre5 Andrew Burgess
2003-07-14 7:16 ` Willy Tarreau
2003-07-14 20:11 Andrew Burgess
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.