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
faq:nix [2020/11/14 11:19] – Create Linux-recycle FAQ digital manfaq:nix [2023/02/08 23:50] (current) – [Maximum Open Files] Replace pgrep with pidof digital man
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]]?
 +  * [[#Maximum_Open_Files|How do I resolve ERROR 24 (Too many open files)]]?
      
 ===== Flavors ===== ===== Flavors =====
Line 216: Line 217:
 ===== Recycle ===== ===== Recycle =====
 **Question:**\\ **Question:**\\
-Why do my servers/services fail to recycle when I set the node-recycle flag (e.g. saving changes in [[util:SCFG]]) or when touching [[config:semfiles]]?+Why do my servers/services fail to recycle when I set the node-recycle flag (e.g. saving changes in [[util:SCFG]]) or when touching recycle [[config:semfiles]]? 
 + 
 +**Answer:**\\ 
 +Servers will not recycle while they are in-use. 
 + 
 +<file> 
 +$ node rerun 
 + 
 +Synchronet Node Display/Control Utility v1.34 
 + 
 +Node  1: User #1 reading messages via telnet (M) [R] 
 +Node  2: Waiting for connection [R] 
 +Node  3: Waiting for connection [R] 
 +Node  4: Waiting for connection [R] 
 +Node  5: Waiting for connection [R] 
 +Node  6: Waiting for connection [R] 
 +Node  7: Waiting for connection [R] 
 +Node  8: Waiting for connection [R] 
 +</file>
  
 **Question:**\\ **Question:**\\
Line 227: Line 246:
      
 **Answer:**\\ **Answer:**\\
-Recycle support can be disabled manually be setting the ''NO_RECYCLE'' ''Options'' flag in one or more server sections of your ''[[config:sbbs.ini]]'' file. The log warning messages above indicate that the BBS automatically set this option flag because it was:+Recycle support can be disabled manually be setting the ''NO_RECYCLE'' ''Options'' flag in one or more server sections of your ''[[config:sbbs.ini]]'' file.\\ 
 +The log warning messages above ("Disabling ... recycle support"indicate that the BBS automatically set the ''NO_RECYCLE'' option flag because it was:
   - Configured to bind-to/listen-on TCP ports < 1024 (the so-called "reserved" ports)   - Configured to bind-to/listen-on TCP ports < 1024 (the so-called "reserved" ports)
   - **and** the BBS was configured to change the current user-id in the ''[[config:sbbs.ini#UNIX]]'' section of ''[[config:sbbs.ini]]''   - **and** the BBS was configured to change the current user-id in the ''[[config:sbbs.ini#UNIX]]'' section of ''[[config:sbbs.ini]]''
   - **and** the BBS could not dynamically set the bind capabilities using the Linux "Capabilities" syscall interface.   - **and** the BBS could not dynamically set the bind capabilities using the Linux "Capabilities" syscall interface.
  
-The solution is to remove the ''User'' and ''Group'' settings from the ''[[config:sbbs.ini#UNIX]]'' section of ''[[config:sbbs.ini]]'' and the follow the instructions [[howto:Linux_non-root|here]] for running the BBS on Linux as a non-root user.+The solution is to remove the ''User'' and ''Group'' settings from the ''[[config:sbbs.ini#UNIX]]'' section of ''[[config:sbbs.ini]]'' and then follow the instructions [[howto:Linux_non-root|here]] for running the BBS on Linux as a non-root user (if you haven't already). 
 + 
 +===== Maximum Open Files ===== 
 +**Question:**\\ 
 +Why am I seeing ''ERROR 24 (Too many open files)'' failures in my error log? 
 + 
 +**Answer:**\\ 
 +Versions of Synchronet prior to v3.19c contained a bug with the JavaScript //User// class that could cause a leak of open file descriptors (concurrent opens of the ''[[dir:data]]/user.dat'' file that were never closed). This bug, combined with a long-running //webv4// ''events.ssjs'' issue that could cause a lot of instances of the //User// class to linger in the JavaScript heap (since fixed with a call to ''js.gc()''), could cause "Too many open files" errors to occur. 
 + 
 +**Answer:**\\ 
 +You need to increase your maximum number of open files. 
 +\\ \\ 
 +**Checking current open file limits**\\ 
 +The most reliable way to determine your open file limit is to login to your BBS as a sysop, run the '';SHELL'' [[module:str_cmds|string command]], and at the OS command line, issue 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). 
 + 
 +To view the soft limit: ''ulimit -Sn''\\ 
 +To view the hard limit: ''ulimit -Hn'' 
 + 
 +Another method that works on Linux is to search for line beginning with "Max open files" in the file ''/proc/$(pidof sbbs)/limits'': 
 +  $ sudo grep "Max open files" /proc/$(pidof sbbs)/limits 
 +  Max open files            10000                10000                files      
 + 
 +**If you start Synchronet with systemd**\\ 
 +If you're using [[howto:systemd|systemd]] to start sbbs, edit your service file (usually ''sbbs.service'') by adding the following line in the ''[Service]'' section: 
 + 
 +<file sbbs.service> 
 +LimitNOFILE=10000 
 +</file> 
 + 
 +After adding the line, reload the service file from the command line using ''systemctl daemon-reload''. Finally, restart Synchronet. 
 + 
 +**If you start Synchronet manually or with a shell script**\\ 
 +If you start sbbs with a shell script, manually from the command line, or some other similar method, edit ''/etc/security/limits.conf'' to add the lines below. 
 + 
 +To raise the soft limit for your Synchronet user, add this line: 
 + 
 +<file limits.conf> 
 +yourBBSuser     soft     nofile     10000 
 +</file> 
  
 +      
 ===== See Also ===== ===== See Also =====
   * [[:faq:|Frequently Asked Questions]]   * [[:faq:|Frequently Asked Questions]]