Q
Qi Lu
I am writing an application server using TCP server which can only
accept upto 249 client connections. After that, I get 'Error: Too many
open files..'. I run my server in Windows XP.
Windows XP has a limit of 255 files opened by any process, including
stdin, stdout and stderr. I googled for how to increase the limit, and
have not found a solution other than:
1. modify main.c and call _setmaxstdio(n), which need recompile ruby;
2. use Win32 API to accept connection.
I noticed that there are so many people post this problem but their
limits are different, some people have 512, some have 1024. looks like
this number is configurable. my machine is set to 255 which is way too
low. I can run multiple processes to get around this problem, but not 23
process to support 5000 connections.
Anything I can do to fix this? Thanks in ahead.
Qi
accept upto 249 client connections. After that, I get 'Error: Too many
open files..'. I run my server in Windows XP.
Windows XP has a limit of 255 files opened by any process, including
stdin, stdout and stderr. I googled for how to increase the limit, and
have not found a solution other than:
1. modify main.c and call _setmaxstdio(n), which need recompile ruby;
2. use Win32 API to accept connection.
I noticed that there are so many people post this problem but their
limits are different, some people have 512, some have 1024. looks like
this number is configurable. my machine is set to 255 which is way too
low. I can run multiple processes to get around this problem, but not 23
process to support 5000 connections.
Anything I can do to fix this? Thanks in ahead.
Qi