java.net.SocketException: Too many open files
Issue
- We are receiving the 'Too many open files' exception in our server logs:
Socket accept failed java.net.SocketException: Too many open files
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
...
...
java.io.FileNotFoundException: filename (Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at java.io.FileReader.<init>(FileReader.java:41)
- java.net.SocketException: Too many open files -- Need RCA
<Critical> <Server> <BEA-002616> <Failed to listen on channel "Default[2]" on 127.0.0.1:7001, failure count: 1, failing for 0 seconds, java.net.SocketException: Too many open files>
- Facing the below error on server :
19:57:22,988 ERROR [DiskStore] ticketCache: Could not create disk store. Initial cause was /tmp/path/ticketCache.data (Too many open files)
java.io.FileNotFoundException: /tmp/path/ticketCache.data (Too many open files)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:233)
at net.sf.ehcache.store.DiskStore.initialiseFiles(DiskStore.java:208)
at net.sf.ehcache.store.DiskStore.<init>(DiskStore.java:153)
at net.sf.ehcache.Cache.createDiskStore(Cache.java:526)
at net.sf.ehcache.Cache.initialise(Cache.java:503)
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:634)
at net.sf.ehcache.CacheManager.addCache(CacheManager.java:624)
at org.springframework.cache.ehcache.EhCacheFactoryBean.afterPropertiesSet(EhCacheFactoryBean.java:259)
- We are using jboss-eap-5.1 we get some error "Too many open files : java.net.SocketException:" Kindly check why this error occured
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 4.x
- 5.x
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
