Resource Menu

Id : 32
Type : BUG
Reporter : Maxime Biais
Assignee :
Sebastien Jourdain
Priority : MAJOR
Creation Date : 10 Aug 05 05:08
Last Update Date : 17 Jan 07 07:26
Resolution : Fixed
Too many open files
Bug found in LibreSource server installed on a Linux platform.

When using the search engine, an Exception is throwed saying "Too many files are open". After using the unix command "lsof" too see opened files, I can see many TCP sockets used by Java.

The "netstate | grep postgresql" command lists all the tcp sockets opened on postgreSQL server: about 2000 "ESTABLISHED" connections, this must be the source of the problem.


Upload a new file :   
3 comment(s)
comment by Guest - 11 Jan 06 12:23 PM common problem with redHat distrib default config (from http://www.jivesoftware.com/jive/entry.jspa?externalID=171&categoryID=2 ):

the following is an example of how to do this for RedHat Linux 7.3. The following is an example of the output of

ulimit -aH

You can see that the current shell (and its children) is restricted to 1024 open file descriptors.

invalid link : root@host /(Illegal character in path at index 9: root@host /)# ulimit -aH

core file size (blocks) unlimited data seg size (kbytes) unlimited file size (blocks) unlimited max locked memory (kbytes) unlimited max memory size (kbytes) unlimited open files 1024 pipe size (512 bytes) 8 stack size (kbytes) unlimited cpu time (seconds) unlimited max user processes 4094 virtual memory (kbytes) unlimited

The file descriptor limit can be increased using the following procedure:

  1. Edit /etc/security/limits.conf and add the lines:
  • soft nofile 1024
  • hard nofile 65535
2. Edit /etc/pam.d/login, adding the line:

session required /lib/security/pam_limits.so

3. The system-wide file descriptor limit is set in /proc/sys/fs/file-max. The following command will increase the limit to 65535:

echo 65535 > /proc/sys/fs/file-max

4. Finally, increase the file descriptor limits using:

ulimit -n 8192

5. You may also have to update /etc/sysctl.conf and add/change the fs.file-max setting to:

  1. Set the maximum number of open files
fs.file-max=65535

Note that you may need to log out and back in again before the changes take effect.

comment by Florent Jouille - 11 Jan 06 12:23 PM I think you make a mistake, because the search engine don't access to the database (Lucene use the file system).
Maybe can i help you if you give me the complete trace of the error…
comment by Sebastien Jourdain - 11 Jan 06 12:23 PM
Caused by: java.io.FileNotFoundException: /data/libresource/shared2/index/_9rw.fdx (Too many open files)
	at java.io.RandomAccessFile.open(Native Method)
	at java.io.RandomAccessFile.(RandomAccessFile.java:204)
	at org.apache.lucene.store.FSInputStream$Descriptor.(FSDirectory.java:389)
	at org.apache.lucene.store.FSInputStream.(FSDirectory.java:418)
	at org.apache.lucene.store.FSDirectory.openFile(FSDirectory.java:291)
	at org.apache.lucene.index.FieldsReader.(FieldsReader.java:80)
	at org.apache.lucene.index.SegmentReader.(SegmentReader.java:139)
	at org.apache.lucene.index.SegmentReader.(SegmentReader.java:120)
	at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:122)
	at org.apache.lucene.store.Lock$With.run(Lock.java:148)
	at org.apache.lucene.index.IndexReader.open(IndexReader.java:111)
	at courgette.search.CourgetteSearch.search(CourgetteSearch.java:149)
Post a comment :


Wiki Syntax

Simple text filters

MnemonicRenderingComment
1 Title a style 1 heading (major heading)
1.1 Title a style 1.1 heading (minor heading)
- text a list item (with -), several lines create a single list
* text a list item (with *)
1. text an enumerated list
__bold__boldsimple bold text
~~italics~~italicssimple italic text
--strike--strikestrike through text
(empty line) produces a new paragraph
\\
 creates a line break, please use sparingly!
[/documentation] or [../documentation] or [/documentation|Doc]Like a standard linkinternal link to another document
http://www.libresource.org/http://www.libresource.org/creates a link to an external resource, special characters that come after the URL and are not part of it must be separated with a space.
\XXescape special character X (i.e. {)
---- creates a horizontal rule

Macros List

Macro syntaxe: {macroName:key1=param1|key2=param2|...}

MacroDescriptionParameters
apiGenerates links to Java or Ruby API documentation.1: class name, e.g. java.lang.Object or java.lang.Object@Java131
2: mode, e.g. Java12, Ruby, defaults to Java (optional)
asinGenerates links to DVD/CD dealers or comparison services. Configuration is read from conf/asinservices.txt1: asin number
blinkBlink a text.the text
bookmarksDisplay the user bookmarks.none
boxCreate a box in order to change the basic disposition.1. the box title (optional)
2. the floating behaviour (left or right) (optional)
3. the height of the box (px,%) (optional)
4. the width of the box (px,%) (optional)
childrenDisplay the current children list.1. uri= ...(optional) where you list the resources, the default uri is the current
2. groupby=… (optional) to group resources.The following value are available : type or owner or uri or creation or update or name
3. sort=… (optional) to sort resources. The values available are : type or owner or uri or creation or update or name
4. creation=...(optional) allows you to filter on the creation date. The values available are: Date (dd/MM/yyyy) or '+'/'-'/'!' followed by a Date(dd/MM/yyyy): allows to keep superior/inferior/exclude date
5. update=...(optional) allows you to filter on the modification date. The values available are: Date (dd/MM/yyyy) or '+'/'-'/'!' followed by a Date(dd/MM/yyyy): allows to keep superior/inferior/exclude date
6. type=...(optional) :allows you to filter resources with its type. The values available are : Project, Template, Timeline, Page, Repository, File, Forum, Thread, Message, Group, Synchronizer, BugTracker, Issue, Site, Survey, Form, DropBox
7. owner=...(optional):allows you to show only resources belonging to one user or many users.
8. limit=...(optional): allows you to limit the displayed resources
9. depth=...(optional): allows you to fix the depth of listed ressources
10. view=...(optional): to fix the view of displayed resources. The view available are : flat (default view) or count(to display the number of listed ressources) or tree(display resource following tree viewer)
codeDisplays a chunk of code with syntax highlighting, for example Java, XML and SQL. The none type will do nothing and is useful for unknown code types.1: syntax highlighter to use, defaults to java (optional)
helloSay hello example macro.1: name to print
htmlBy pass wiki engine to allow HTML code in contentthe html block
api-docsDisplays a list of known online API documentations and mappings.none
file-pathDisplays a file system path. The file path should use slashes. Defaults to windows.1: file path
imageDisplay an image.1. the image URI
2. align (right ,left or center) (optional)
3. width (optional)
4. height (optional)
inter-wikiDisplays a list of known InterWiki mappings.none
isbnGenerates links to book dealers or comparison services. Configuration is read from conf/bookservices.txt.1: isbn number
linkGenerate a weblink.unexplained, lazy programmer, probably
list-of-macrosDisplays a list of available macros.unexplained, lazy programmer, probably
loginBoxDisplay a login box.none
mailtoDisplays an email address.1: mail address
menuInclude the menu of the specified URI1. The uri for the menu to be include
newsDisplay a message thread as news.1. the thread URI
2. Max (optional)
preAllow rigid text style. (Keep text formating)none
printFieldDisplay a node forms fields values.1. (uri=) The uri on which you want to get the form value (Optional, by default=.)
2. (print=) Print or not the field label and the field value (Optional, by default=label, value, edit)
3. (field=) Print or not the specified field (Optional, by default will print all)
quoteDisplay quotations.1: source (optional)
2: displayed description, default is Source (optional)
quoteMessageQuote a message in another message by referencing only the message URI.1. The message URI to quote.
resourceInclude the view of a LibreSource resource.1. the uri of the resource (mandatory)
2. the view (optional)
3. the action (optional)
4. noaction (optional)
rfcGenerates links to RFCs.unexplained, lazy programmer, probably
rssInclude an RSS feed.1. the url of the rss feed (mandatory)
searchBoxDisplay a search box.1. the URI pattern
subProjectsDisplay the current subProjects list.none
summaryCreate the summary of a wiki page.1. the page URI (optional)
surveyDisplay results of a survey.the survey URI
tableDisplays a table.none
tableFormDisplay a table listing form results.1. (uri=) The uri on which you want to get the form value (Optional, by default use the local path)
2. (print=) Print additinal features such as a link to the data (goLink) or a link to get a CSV file (csvExport) (Optional, by default print all)
3. (field=) The list of field to show (Optional by default all)
timelineDisplay the first items of a timeline.1. the timeline URI
2. Max items (optional)
userGenerate a link to the current user page, according 'action'.1. the action (optional)
2. the link label (optional)
workspacesDisplay the user workspaces.none
xrefGenerates links to Java Xref source code.1: class name, e.g. java.lang.Object or java.lang.Object@Nanning
2: line number (optional)

Smiley

:-):-(;-):-P:-D:-[:-/:-*>:o8-):-$:-!:'(:-X =-O