On Mon, 16 Jun 2003, Toad wrote: > Default ulimit -n on my (debian) system is 1024. I have no changes in > /etc/security/limits.conf. I hear that BSD has an actual fixed size > table, but I assumed linux was less braindead. It is. But it imposes a > default of 1024 anyway. Wonderful. Is this the same on other > distributions? Yes, I know they use up kernel memory, but on a modern > architecture machine with a gigabyte of RAM... I am therefore setting > the default maxConnections on the NIO branch down to 256. GRRR.
Saying "Alter the following line in /etc/security/limits.conf" in the
run-freenet.sh if the limit is too low seems an option.
Something like this:
--Dan
#!/bin/bash
FD_LIMIT=`ulimit -n -H`
FD_NEEDED=40960
if [ $FD_LIMIT != "unlimited" -a $FD_LIMIT -lt $FD_NEEDED ]; then
echo -e "\tYikes! Not enough file descriptors!" >&2
echo -e "\tPlease modify /etc/default/limits.conf (or your
distribution" >&2
echo -e "\tequivalant) to at least $FD_NEEDED" >&2
exit 1
fi
echo "Got enough file descriptors, continuing"
echo "java -cp lib/freenet.jar ..."
pgp00000.pgp
Description: PGP signature
