[Building Sakai] Getting Too many open files in system error
İrfan SÜRAL
irfansural at gmail.com
Mon Jan 5 05:06:19 PST 2015
Hi Pravian
Actually I don't need to change anything in /etc/security/limits.conf
I advise you to add ulimit -n 300000 in /root/.bashrc
Log off and log in then start tomcat see logs
Irfan
From: Pravin G [mailto:praving at leotechnosoft.net]
Sent: Monday, January 5, 2015 2:54 PM
To: 'Irfan SÜRAL'; sakai-dev at collab.sakaiproject.org
Subject: RE: [Building Sakai] Getting Too many open files in system error
Hi Irfan,
Hey Thank you for reply.
I have set this limit i.e
root soft nofile 65536
root hard nofile 65536
* soft nofile 65536
* hard nofile 65536
in etc/security/limits.conf file as a root user.
So do I need to set this ulimit -n 300000 //(I have set in limits.conf as
a max value i.e 65536) in .bashrc file as root user itself? Or both files
should perform changes using userxxx ?
Thanks,
-
Pravin
From: Irfan SÜRAL [mailto:irfansural at gmail.com]
Sent: 05 January 2015 17:40
To: 'Pravin G'; sakai-dev at collab.sakaiproject.org
<mailto:sakai-dev at collab.sakaiproject.org>
Subject: RE: [Building Sakai] Getting Too many open files in system error
Hi
Make sure your ulimit is activated. Therefore i recommend you to put this in
.bashrc file
$ nano /home/userxxx/.bashrc
ulimit -n 300000
Once I resolved my pprooblem in this way.
Irfan
From: sakai-dev-bounces at collab.sakaiproject.org
<mailto:sakai-dev-bounces at collab.sakaiproject.org>
[mailto:sakai-dev-bounces at collab.sakaiproject.org] On Behalf Of Pravin G
Sent: Monday, January 5, 2015 8:17 AM
To: sakai-dev at collab.sakaiproject.org
<mailto:sakai-dev at collab.sakaiproject.org>
Subject: [Building Sakai] Getting Too many open files in system error
Hi I am running sakai 2.9.1, I am getting 'Too many open files in system '
error many times.
I have tried to resolve this issue by modifying etc/security/limits.conf in
this way.
Added below lines in limits.conf "
root soft nofile 65536
root hard nofile 65536
* soft nofile 65536
* hard nofile 65536
#ulimit -n 5000
And after system restart , I am able to see open files size as :65536 &
others as below.
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 2062456
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65536
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 2062456
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
But still I am getting errors as :
Caused by: java.io.FileNotFoundException:
/home/apache-tomcat-7.0.26/sakai/indexwork/index/_3_7.del (Too many open
files in system)
at java.io.RandomAccessFile.open(Native Method)
at
java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
at
org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput$Descriptor.<ini
t>(SimpleFSDirectory.java:78)
at
org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.<init>(SimpleFS
Directory.java:108)
at
org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.<init>(NIOFSDirectory
.java:106)
at
org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:82)
at
org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:703)
at
org.apache.lucene.util.BitVector.<init>(BitVector.java:221)
at
org.apache.lucene.index.SegmentReader.loadDeletedDocs(SegmentReader.java:711
)
at
org.apache.lucene.index.SegmentReader.get(SegmentReader.java:671)
at
org.apache.lucene.index.SegmentReader.get(SegmentReader.java:628)
at
org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:108)
at
org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:80)
at
org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:
683)
at
org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:73)
at
org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
at
org.apache.lucene.index.IndexReader.open(IndexReader.java:314)
at
org.sakaiproject.search.journal.impl.JournaledFSIndexStorage.getIndexReaderI
nternal(JournaledFSIndexStorage.java:836)
at
org.sakaiproject.search.journal.impl.JournaledFSIndexStorage.getIndexReader(
JournaledFSIndexStorage.java:745)
at
org.sakaiproject.search.journal.impl.JournaledFSIndexStorage.getDeletionInde
xReader(JournaledFSIndexStorage.java:573)
at
org.sakaiproject.search.journal.impl.JournaledFSIndexStorageUpdateTransactio
nListener.prepare(JournaledFSIndexStorageUpdateTransactionListener.java:124)
... 6 more
& sometimes only this :
org.apache.tomcat.util.net.JIoEndpoint$Acceptor run SEVERE: Socket accept
failed
java.net.SocketException: Too many open files in system
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultSe
rverSocketFactory.java:60)
at
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:216)
at java.lang.Thread.run(Thread.java:619)
Can anyone please guide me how can I resolve this error.
Thanks,
-
Pravin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20150105/7e9536c4/attachment.html
More information about the sakai-dev
mailing list