Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
faq:nix [2022/05/06 22:20] – Add FAQ about "Too many open files" error and solution digital manfaq:nix [2022/05/07 18:50] – [Maximum Open Files] added systemd section. nelgin
Line 22: Line 22:
   * [[#SDL Errors|How do I work around SDL 1.2 run-time errors]]?   * [[#SDL Errors|How do I work around SDL 1.2 run-time errors]]?
   * [[#Recycle|Why does the recycling of servers/services not work]]?   * [[#Recycle|Why does the recycling of servers/services not work]]?
-  * [[#maxopenfiles|How do I resolve ERROR 24 (Too many open files)]]?+  * [[#Maximum_Open_Files|How do I resolve ERROR 24 (Too many open files)]]?
      
 ===== Flavors ===== ===== Flavors =====
Line 256: Line 256:
 ===== Maximum Open Files ===== ===== Maximum Open Files =====
 **Question:**\\ **Question:**\\
-Why am I getting ''ERROR 24 (Too many open files)'' failures when Synchronet tries to open files and how do I resolve that?+Why am I seeing ''ERROR 24 (Too many open files)'' failures in my error log?
  
 **Answer:**\\ **Answer:**\\
-You need to increase your maximum open file count. Run ''ulimit -n'' as the user you run Synchronet as to display the current open file limit.+You need to increase your maximum number of open files.
  
-On Linux, edit ''/etc/security/limits.conf'' to edit the default limit for all users:+To determine your open file limit, when logged in as the user Synchronet runs as, use the commands below. The hard limit is the systemwide limit, and the soft limit is one that a user can raise (up to the hard limit). 
 + 
 +Soft limit: ''ulimit -Sn''\\ 
 +Hard limit: ''ulimit -Hn'' 
 + 
 +To alleviate the ERROR 24 problem on Linux, follow one of the following procedures. 
 + 
 + 
 +If you're not using systemd to start sbbs you can edit ''/etc/security/limits.conf'' to add the lines below. 
 + 
 +To raise the soft limit up to the hard limit for your Synchronet user, it is recommended to add this line:
  
 <file limits.conf> <file limits.conf>
-*               soft    nofile          999999+yourBBSuser     soft     nofile     unlimited
 </file> </file>
  
 +If you are still receiving ERROR 24, try raising both limits for all users by adding these lines instead:
 +
 +<file limits.conf>
 +*               hard     nofile     unlimited
 +*               soft     nofile     unlimited
 +</file>
 + 
 +
 +If you are running sbbs from systemd then you'll need to edit your service file. Add the following line in the [Service] section
 +
 +   LimitNOFILE=10000
 +Reload the service file
 +
 +   systemctl daemon-reload
 +This will give you a safety net in case a runaway process tries to open a lot of files. Don't forget to restart your bbs after making the change. 
 +
 +To verify the number of files, you can use the sysop ;SHELL command and run
 +
 +  ulimit -a
 +to see exactly which limits your process is to conform to.
 +
 +      
 ===== See Also ===== ===== See Also =====
   * [[:faq:|Frequently Asked Questions]]   * [[:faq:|Frequently Asked Questions]]