LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-08-2001, 03:04 AM   #1
zhnt
LQ Newbie
 
Registered: Apr 2001
Posts: 2

Rep: Reputation: 0
Question


How can I open more than 2000 file description at the moment? In my case, I only open about 1700 sockets at the moment? It seems I should modify some configuration,but I dont's know what to do? I'm anxious to know answer,thanks!
 
Old 04-08-2001, 10:05 AM   #2
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,600

Rep: Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083
To change the number of file descriptors available try the following as root.
Code:
echo 8192 > /proc/sys/fs/file-max
 
Old 04-08-2001, 08:30 PM   #3
zhnt
LQ Newbie
 
Registered: Apr 2001
Posts: 2

Original Poster
Rep: Reputation: 0
Angry

thanks you!
I'm use redhat6.2,kernel 2.2.4, it occur error:
java.net.SocketException: Too many open files
Too many open sockets. Each implementation may have a maximum number of socket handles available, either globally, per process or per thread
The server has no file handles available

I try echo 8192 > /proc/sys/fs/file-max
but no effect. Then I change the limit of
limits.h and fs.h and recompile linux, but when
exceed about 1500 threads,it kill my whole program
and display error message:
at ChatServer.g.run(Unknown Source)
"Thread-866" (TID:0x40e5ef38, sys_thread_t:0x86e0310, state:CW) prio=5
at java.net.SocketInputStream.socketRead(Native
Method)
at java.net.SocketInputStream.read(SocketInputStream.java:86)
at java.
net.SocketInputStream.read(SocketInputStream.java:67)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
edonkey 2000/file sharing Chuck23 Linux - Software 2 08-23-2004 07:54 PM
File sharing between RH9 and 2000 novkhan Linux - Newbie 2 04-25-2004 02:44 AM
How to open a wps file in open office 1.1 oneiric Linux - Software 4 04-15-2004 04:07 AM
file description apache mjenkins Linux - General 2 04-08-2004 12:32 AM
S3 Savage 2000 and Open GL the anti-riced Linux - Hardware 4 11-13-2003 07:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration