java.net.SocketException: Too many open files

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

pharoh
Posts: 49
Joined: Mon Feb 19, 2007 4:59 pm

java.net.SocketException: Too many open files

Postby pharoh » Wed Feb 21, 2007 9:31 am

as the subject states we are getting this error in our catalina.out log, here is the actual log snippet:

Code: Select all

 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)
        at java.net.ServerSocket.accept(Unknown Source)
        at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:293)
        at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:647)
        at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:857)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)
Feb 21, 2007 7:30:36 AM org.apache.catalina.core.ApplicationContext log
INFO: ip: 10.1.1.44; username: email@domain.tld; message: <SOAP-ENV:Fault><faultcode>SOAP-ENV:CLIENT.ProblemConnectingToImap</faultcode><faultstring>There was a problem connecting to the mail server. Please try again later.</faultstring><detail><e:ProblemConnectingToImap xmlns:e="http://scalix.com/errors"><message>There was a problem connecting to the mail server. Please try again later.</message><debug>user: email@domain.tld
request method(s): login
XML:
&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"&gt;&lt;SOAP-ENV:Header&gt;&lt;credentials xmlns="http://scalix.com/schemas/gofish" SOAP-ENV:mustUnderstand="1"&gt;&lt;username&gt;email@domain.tld&lt;/username&gt;&lt;emailDomain&gt;domain.tld&lt;/emailDomain&gt;&lt;fugu&gt;Ox4a327d2e71377d227e303430232a2922262d2909&lt;/fugu&gt;&lt;ts&gt;0&lt;/ts&gt;&lt;/credentials&gt;&lt;/SOAP-ENV:Header&gt;&lt;SOAP-ENV:Body&gt;&lt;m:login xmlns:m="http://scalix.com/methods"/&gt;&lt;/SOAP-ENV:Body&gt;&lt;/SOAP-ENV:Envelope&gt;</debug></e:ProblemConnectingToImap></detail></SOAP-ENV:Fault>
Feb 21, 2007 7:30:39 AM org.apache.jk.common.ChannelSocket acceptConnections
WARNING: Exception executing accept
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)
        at java.net.ServerSocket.accept(Unknown Source)
        at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:293)
        at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:647)
        at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:857)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Unknown Source)



any help would be appreciated.

we have 3 users 1 in outlook and two through webmail, and ~3gb of email.

If I restart tomcat it works for most of the day or until overnight then starts failing again.
Last edited by pharoh on Wed Feb 21, 2007 5:00 pm, edited 1 time in total.

pharoh
Posts: 49
Joined: Mon Feb 19, 2007 4:59 pm

Postby pharoh » Wed Feb 21, 2007 10:05 am

we have added 2 lines to /etc/security/limits.conf

Code: Select all

scalix          hard    nofile          32767
root            hard    nofile          32767


and we will see if this helps I beleive that we are running into the max number of files open per-proccess for the jvm and this setting should set that much higher, the default was 1024.

pharoh
Posts: 49
Joined: Mon Feb 19, 2007 4:59 pm

Postby pharoh » Wed Feb 21, 2007 4:58 pm

this seems to have stopped the problem. It was happening about every 2-3 hours after a tomcat restart but now it's running great and the interface is noticeably faster (we also bumped the memory for the java engine to 384 from the default of 125 but that was done while we were still having problems).

deyjvu
Posts: 175
Joined: Tue Oct 25, 2005 6:48 am
Location: Australia

Postby deyjvu » Thu May 17, 2007 9:40 pm

This could be the issue in bug http://bugzilla.scalix.com/show_bug.cgi?id=13143

Also a precurser to this problem in my case was that users were seeing an error when they tried to logon "There was a problem connecting to the mail server. Please try again later". When looking for the cause of this error I found the "Too many open files" error mentioned in the java log files. This site is on 11.0.2 and had their open files set to 1024.

mnauta
Posts: 152
Joined: Wed Feb 23, 2005 4:10 pm
Location: Austin, TX

Postby mnauta » Thu Jun 14, 2007 10:50 am

pharoh wrote:we have added 2 lines to /etc/security/limits.conf

Code: Select all

scalix          hard    nofile          32767
root            hard    nofile          32767


and we will see if this helps I beleive that we are running into the max number of files open per-proccess for the jvm and this setting should set that much higher, the default was 1024.


yesterday I had two issue, one a message that server to busy can't log in to SWA and another where you could logon to SWA but the next page (inbox etc) would stay totally blank. Each time I restated tomcat it fixed it.

Might this be the same? How can I make changes to the limits.conf file effective, what do I need to restart or reload?

Thanks
manuel

mxc
Posts: 22
Joined: Fri Mar 28, 2008 12:45 am
Contact:

Postby mxc » Mon Mar 31, 2008 8:22 am

I have edited /etc/security/limits.conf and /etc/opt/scalix-tomcat/scalix-tomcat.conf to increase the open file limit but i still get this error.

mxc
Posts: 22
Joined: Fri Mar 28, 2008 12:45 am
Contact:

Postby mxc » Mon Mar 31, 2008 10:19 am

Should I also increase /proc/sys/fs/file-max? This is proving to be a real pain and the client is considering replacing Scalix with Zimbra.

deyjvu
Posts: 175
Joined: Tue Oct 25, 2005 6:48 am
Location: Australia

Postby deyjvu » Tue Apr 01, 2008 5:57 am

Did you check the bug that was pointed to, it indicates that there have been changes made by Scalix in later versions so check if you haven't already got the change in your scalix-tomcat already. If you haven't then try the change but make sure you have rebooted the appropriate services for the change to take affect.

mxc
Posts: 22
Joined: Fri Mar 28, 2008 12:45 am
Contact:

Postby mxc » Tue Apr 01, 2008 12:11 pm

i have edited the scalix-tomcat.conf file as directed and still no luck. The client has decided to abandon scalix.

ls-al
Scalix Star
Scalix Star
Posts: 510
Joined: Tue Jun 29, 2004 8:28 am
Location: Leipzig, Germany
Contact:

Postby ls-al » Wed Apr 02, 2008 11:37 am

mxc wrote:i have edited the scalix-tomcat.conf file as directed and still no luck. The client has decided to abandon scalix.


Hopefully the client is not replacing one Tomcat issue with another...

BTW: You never mentioned essential informations, just reanimated an old thread and pointed to a bug that *is* solved. But it seems that further discussion on this is wasted time.

aebir

Postby aebir » Fri Apr 04, 2008 7:24 am

Hi ,

i have the same problem, I documented this in the thread viewtopic.php?t=10301
but i got no answer


Regards

Rolf

ls-al
Scalix Star
Scalix Star
Posts: 510
Joined: Tue Jun 29, 2004 8:28 am
Location: Leipzig, Germany
Contact:

Postby ls-al » Fri Apr 04, 2008 10:50 am

thread viewtopic.php?t=10301 updated :)


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 3 guests

cron