Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-05-2008, 10:00 PM
Intermediate Member
 
Posts: 21
Unhappy [SOLVED] Too many open files error

How do I fix this "too many open files" error ? Zimbra dies when this error pops up, which happens nearly every day. I have to restart the server to get Zimbra working again.

Our Zimbra version is:
Release 5.0.2_GA_1975.UBUNTU6 UBUNTU6 NETWORK edition


imap - ignoring error during UID FETCH:
com.zimbra.common.service.ServiceException: system failure: IOException while retrieving content for item 1787
Code:service.FAILURE
at com.zimbra.common.service.ServiceException.FAILURE (ServiceException.java:183)
at com.zimbra.cs.mailbox.MessageCache.getMimeMessage( MessageCache.java:252)
at com.zimbra.cs.mailbox.Message.getMimeMessage(Messa ge.java:290)
at com.zimbra.cs.imap.ImapMessage.getMimeMessage(Imap Message.java:176)
at com.zimbra.cs.imap.ImapHandler.fetch(ImapHandler.j ava:2930)
at com.zimbra.cs.imap.ImapHandler.doFETCH(ImapHandler .java:2781)
at com.zimbra.cs.imap.ImapHandler.executeRequest(Imap Handler.java:402)
at com.zimbra.cs.imap.TcpImapHandler.processCommand(T cpImapHandler.java:151)
at com.zimbra.cs.tcpserver.ProtocolHandler.processCon nection(ProtocolHandler.java:160)
at com.zimbra.cs.tcpserver.ProtocolHandler.run(Protoc olHandler.java:128)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Wo rker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException: /opt/zimbra/store/0/13/msg/0/1787-3166.msg (Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.jav a:106)
at com.zimbra.cs.store.FileBlobStore.getContent(FileB lobStore.java:366)
at com.zimbra.cs.store.FileBlobStore.getContent(FileB lobStore.java:360)
at com.zimbra.cs.mailbox.MessageCache.fetchFromStore( MessageCache.java:270)
at com.zimbra.cs.mailbox.MessageCache.getMimeMessage( MessageCache.java:214)


Thanks,
Scott
Reply With Quote
  #2 (permalink)  
Old 03-06-2008, 06:04 AM
Intermediate Member
 
Posts: 17
Default

Try setting the open files limit to unlimited. I had similair problems with JBoss cluster servers. It should help. Just follow the steps below.

This setting will set the maximum limit allowed for open files. On the system.
As sudo or root edit the /etc/security/limits.conf file. At the end of the file just above “# End of File” enter the following values:
* soft nofile 65535
* hard nofile 65535
Save the file. This will set the number of open files to unlimited.

Just need to reset the server after this.

Last edited by vandervyvere; 03-06-2008 at 06:17 AM..
Reply With Quote
  #3 (permalink)  
Old 03-06-2008, 06:14 AM
Outstanding Member
 
Posts: 684
Default

It appears you are having trouble with one message in particular. Is it possible the message is corrupt? I''ve seen other mail servers go bonkers over corrupt headers in message files. I believe it tells you where the message is. Can you delete that one message and see if the problem clears up?
Reply With Quote
  #4 (permalink)  
Old 03-06-2008, 11:15 AM
Intermediate Member
 
Posts: 21
Default Still same problem

Tried the two suggestions but still have the same problem. Zimbra crashed again this morning.

Any more ideas?
Reply With Quote
  #5 (permalink)  
Old 03-06-2008, 01:21 PM
Outstanding Member
 
Posts: 684
Default

After deleting msg 1787, what do the logs say when it crashed. Is it choking on another message?
Reply With Quote
  #6 (permalink)  
Old 03-07-2008, 03:17 PM
New Member
 
Posts: 3
Default Too many open files (Ubuntu, limits.conf, nofile and PAM)

Quote:
Originally Posted by vandervyvere View Post
Try setting the open files limit to unlimited. I had similair problems with JBoss cluster servers. It should help. Just follow the steps below.

This setting will set the maximum limit allowed for open files. On the system.
As sudo or root edit the /etc/security/limits.conf file. At the end of the file just above “# End of File” enter the following values:
* soft nofile 65535
* hard nofile 65535
Save the file. This will set the number of open files to unlimited.

Just need to reset the server after this.
Ubuntu does not include pam_limits.so in common-session, so the open file overrides you have specified in limits.conf are not applied.

To check su to the zimbra user and type 'ulimit -n' if it returns 1024 instead of what you have configured in /etc/security/limits.conf add the following to /etc/pam.d/common-session:
session required pam_limits.so
Restart Zimbra and you should be fine.
Reply With Quote
  #7 (permalink)  
Old 03-31-2008, 08:18 PM
Member
 
Posts: 12
Default

Exact same problem on debian 4.0.

problem occured with imapsync when migrating mailboxes from old server. Imapsync told me warnings with "no header used or found". when syncing an second time i get varios emails duplicated.

... raise openfiles to 65536 an everything works fine!
Reply With Quote
  #8 (permalink)  
Old 04-02-2008, 08:57 AM
Active Member
 
Posts: 27
Default

Quote:
Originally Posted by jhansen View Post
Ubuntu does not include pam_limits.so in common-session, so the open file overrides you have specified in limits.conf are not applied.

To check su to the zimbra user and type 'ulimit -n' if it returns 1024 instead of what you have configured in /etc/security/limits.conf add the following to /etc/pam.d/common-session:
session required pam_limits.so
Restart Zimbra and you should be fine.
jhansen: Thanks for that, Debian 4.0 has the same issue. your fix has been implemented, if it dont work, i'll be back, ulimiy -n now returns the correct number of open files from the limits.conf file.

Thanks muchly

-Roy
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.