December 16, 2025Dec 16 Author code prosperity...Nerd tools / extra options. Thanks to ich777. allows for 3rd party Slack pack app isntalls. step 1:install unget: https://raw.githubusercontent.com/ich777/un-get/refs/heads/master/un-get.plg Step 2: add source list to new repo:The add repo line to /boot/config/plugins/un-get/sources.list :https://raw.githubusercontent.com/shinji257/unraid_pkgs/main/slackware64-current/ shinji257as ich777 had one at one time: https://github.com/ich777/slackwareStep 3 install packages per github:https://github.com/shinji257/unraid_pkgs example I want 7zip: un-get install 7zipMake a user script or add to go file to install applications...This is my understanding of it atm...User script:*At first boot of array#!/bin/bash # Define path and line to add SOURCE_LINE="https://raw.githubusercontent.com/shinji257/unraid_pkgs/main/slackware64-current/ shinji257" SOURCE_DIR="/boot/config/plugins/un-get" SOURCE_FILE="$SOURCE_DIR/sources.list" # Ensure the directory exists if [ ! -d "$SOURCE_DIR" ]; then echo "[+] Creating un-get config directory: $SOURCE_DIR" mkdir -p "$SOURCE_DIR" fi # Ensure the file exists if [ ! -f "$SOURCE_FILE" ]; then echo "[+] Creating sources.list: $SOURCE_FILE" touch "$SOURCE_FILE" fi # Add source line if not already present if ! grep -Fxq "$SOURCE_LINE" "$SOURCE_FILE"; then echo "[+] Adding shinji257 repo to sources.list" echo "$SOURCE_LINE" >> "$SOURCE_FILE" else echo "[✓] shinji257 repo already present" fi #Verify sources echo "[✓] verify repo already present" cat $SOURCE_FILE # Update un-get sources echo "[*] Updating un-get sources..." un-get update Optional add install at bottom to keep apps uptodate...un-get install screen
December 16, 2025Dec 16 Author Saving for code prosperity... (why fight the forum trying to search for old code...)Temp relief due to memory leak error... sometimes yes you may want a higher child count..."[WARNING] [pool www] server reached max_children setting (50), consider raising it"at first I thought this to be a nginx / systemctl thing...nope its good old php... and potential issues with fastcgi...IDK what people are doing to hit that and raising the limit is not a fix to the underline issues... Its Temp Relif...Regardless, you will need a user script plugin and a script at first array start to run to make this last between reboots...cat /etc/php-fpm.d/www.confand look for : pm.max_children = 50default should have:; The number of child processes to be created when pm is set to 'static' and the; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.; This value sets the limit on the number of simultaneous requests that will be; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP; CGI. The below defaults are based on a server without much resources. Don't; forget to tweak pm.* to fit your needs.; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'; Note: This value is mandatory.pm.max_children = 50so at first array start user script plugin run: #!/bin/bash # Increase PHP-FPM max_children to handle more concurrent UI/API calls # Run "At First Array Start" in User Scripts PHP_FPM_CONF="/etc/php-fpm.d/www.conf" NEW_LIMIT=200 # adjust as needed (default 50) # Verify config exists if [[ -f "$PHP_FPM_CONF" ]]; then echo "Updating pm.max_children in $PHP_FPM_CONF to $NEW_LIMIT..." # Use sed to replace the line if it exists, otherwise append it if grep -q '^pm.max_children' "$PHP_FPM_CONF"; then sed -i "s/^pm.max_children.*/pm.max_children = ${NEW_LIMIT}/" "$PHP_FPM_CONF" else echo "pm.max_children = ${NEW_LIMIT}" >> "$PHP_FPM_CONF" fi # Restart PHP-FPM service safely /etc/rc.d/rc.php-fpm restart echo "PHP-FPM restarted with new limit: $NEW_LIMIT" else echo "ERROR: $PHP_FPM_CONF not found. Unraid may have changed its path." fi This will increase the limit to 200...Common areas to check:appdata backup plugin. - I have seen this run and break with vms that could cause this....Overload of system with dockers and vms... (look into using the swap plugin and ram disk for docker log plugin!)unraid connect plugin... (api and changes have caused other issues.Zombie process or heavy AI n8n and other task loadspython code scripting.Weird nginx nchan and emhttp errors with connecting to unraid via mobile browser / browser left on web ui page...emhttp dashboard left on longer then a day uptimes greater then 1 week...Inconsistency to define to a single cascade issues and is usually in conjunction of multiple things.However, again. this is not a fix!!! You need to figure out the memory leak that hitting the 50... Edited December 16, 2025Dec 16 by bmartino1
December 16, 2025Dec 16 Author Code propserity... nchan issueshttps://forums.unraid.net/topic/186600-unraid-crashes-with-stop-running-nchan-processes-webgui-not-reachable/#findComment-1523604User script plugin at boot:#!/bin/bash # Unraid User Script to modify nginx.conf and restart Nginx # Define file paths NGINX_CONF="/etc/nginx/nginx.conf" BACKUP_CONF="/etc/nginx/nginx.conf.bak" # Backup the existing nginx.conf if [ -f "$NGINX_CONF" ]; then cp "$NGINX_CONF" "$BACKUP_CONF" echo "Backup created at $BACKUP_CONF" else echo "Error: $NGINX_CONF not found! Exiting." exit 1 fi # Add the new configuration settings sed -i '/^http {/a \ nchan_max_reserved_memory 64M;\n nchan_message_timeout 30s;\n nchan_message_buffer_length 100;' "$NGINX_CONF" if [ $? -eq 0 ]; then echo "Nginx configuration updated successfully." else echo "Error: Failed to update Nginx configuration." exit 1 fi # Restart Nginx /etc/rc.d/rc.nginx stop && /etc/rc.d/rc.nginx start if [ $? -eq 0 ]; then echo "Nginx restarted successfully." else echo "Error: Failed to restart Nginx. Check configuration." exit 1 fi exit 0Test and let us know whats up. Not sure whats causing these nginx issues I have not yet seen one in my testing...more due to thing with the unraid connect plugin I'm stating to see nchan and php stuff... but nothing like whats other users have reported... I enabled and did xyz from a known stable and investigated what change where did what...More issues with how unraid emhttp is handling some crashes and extended webview time(left in a open page where things like the dashboard refresh call to many pids to colect data)...-Some VM machien qemu quirks that can be fixed with grub and pre boot enviroments...Most of thees have already been looking into by the devs adn have changed and adapted configs to make a stable system theses fast-cgi / nchan shouldn't be used unless you in a older v6 unriad OS experiencing the issues..."Unraid crashes with "Stop running nchan processes" - WebGUI not reachable"
January 1Jan 1 Author On 12/16/2025 at 2:19 PM, bmartino1 said:Saving for code prosperity... (why fight the forum trying to search for old code...)Temp relief due to memory leak error... sometimes yes you may want a higher child count..."[WARNING] [pool www] server reached max_children setting (50), consider raising it"at first I thought this to be a nginx / systemctl thing...nope its good old php... and potential issues with fastcgi...IDK what people are doing to hit that and raising the limit is not a fix to the underline issues... Its Temp Relif...Regardless, you will need a user script plugin and a script at first array start to run to make this last between reboots...cat /etc/php-fpm.d/www.confand look for : pm.max_children = 50default should have:; The number of child processes to be created when pm is set to 'static' and the; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.; This value sets the limit on the number of simultaneous requests that will be; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP; CGI. The below defaults are based on a server without much resources. Don't; forget to tweak pm.* to fit your needs.; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'; Note: This value is mandatory.pm.max_children = 50so at first array start user script plugin run: #!/bin/bash # Increase PHP-FPM max_children to handle more concurrent UI/API calls # Run "At First Array Start" in User Scripts PHP_FPM_CONF="/etc/php-fpm.d/www.conf" NEW_LIMIT=200 # adjust as needed (default 50) # Verify config exists if [[ -f "$PHP_FPM_CONF" ]]; then echo "Updating pm.max_children in $PHP_FPM_CONF to $NEW_LIMIT..." # Use sed to replace the line if it exists, otherwise append it if grep -q '^pm.max_children' "$PHP_FPM_CONF"; then sed -i "s/^pm.max_children.*/pm.max_children = ${NEW_LIMIT}/" "$PHP_FPM_CONF" else echo "pm.max_children = ${NEW_LIMIT}" >> "$PHP_FPM_CONF" fi # Restart PHP-FPM service safely /etc/rc.d/rc.php-fpm restart echo "PHP-FPM restarted with new limit: $NEW_LIMIT" else echo "ERROR: $PHP_FPM_CONF not found. Unraid may have changed its path." fi This will increase the limit to 200...Common areas to check:appdata backup plugin. - I have seen this run and break with vms that could cause this....Overload of system with dockers and vms... (look into using the swap plugin and ram disk for docker log plugin!)unraid connect plugin... (api and changes have caused other issues.Zombie process or heavy AI n8n and other task loadspython code scripting.Weird nginx nchan and emhttp errors with connecting to unraid via mobile browser / browser left on web ui page...emhttp dashboard left on longer then a day uptimes greater then 1 week...Inconsistency to define to a single cascade issues and is usually in conjunction of multiple things.However, again. this is not a fix!!! You need to figure out the memory leak that hitting the 50...some more code prosperity..https://forums.unraid.net/topic/194245-pool-www-server-reached-max_children-setting-50-consider-raising-it/#findComment-1598907Script to finetune unraids fastcgi.. and add teh fastcgi status page to track the childs what pid how long etc...a#!/bin/bash # Unraid PHP-FPM hardening + diagnostics # Run: At First Array Start PHP_FPM_CONF="/etc/php-fpm.d/www.conf" set_value() { local key="$1" local value="$2" if grep -qE "^[;[:space:]]*${key}[[:space:]]*=" "$PHP_FPM_CONF"; then sed -i -E "s|^[;[:space:]]*${key}[[:space:]]*=.*|${key} = ${value}|" "$PHP_FPM_CONF" else echo "${key} = ${value}" >> "$PHP_FPM_CONF" fi } if [[ -f "$PHP_FPM_CONF" ]]; then echo "Configuring PHP-FPM limits and status endpoint in $PHP_FPM_CONF" # Process model set_value "pm" "ondemand" set_value "pm.max_children" "50" set_value "pm.process_idle_timeout" "10s" set_value "pm.max_requests" "200" # Hung / zombie worker kill switches set_value "request_terminate_timeout" "120s" set_value "request_terminate_timeout_track_finished" "yes" # FPM status endpoint (read-only diagnostics) set_value "pm.status_path" "/fpm-status" # Restart PHP-FPM echo "Restarting PHP-FPM..." /etc/rc.d/rc.php-fpm restart echo "PHP-FPM configuration enforced successfully." else echo "ERROR: $PHP_FPM_CONF not found. PHP-FPM may not be installed or path changed." fi adds and sets:so lets makse some safe tuning:pm = ondemandpm.max_children = 50pm.process_idle_timeout = 10spm.max_requests = 200request_terminate_timeout = 120srequest_terminate_timeout_track_finished = yespm.status_path = /fpm-statussimnalr another base script needs ran to allow niginx / the web server to use the status page..#!/bin/bash # Unraid nginx FastCGI injection for PHP-FPM status # Ensures correct /fpm-status location exists and is clean # Run: At First Array Start NGINX_LOCATIONS="/etc/nginx/conf.d/locations.conf" read -r -d '' STATUS_BLOCK <<'EOF' location = /fpm-status { include fastcgi_params; fastcgi_param SCRIPT_NAME /fpm-status; fastcgi_param SCRIPT_FILENAME /fpm-status; allow 192.168.0.0/16; deny all; } EOF if [[ ! -f "$NGINX_LOCATIONS" ]]; then echo "ERROR: $NGINX_LOCATIONS not found." exit 1 fi echo "Ensuring /fpm-status nginx location is correct..." # Remove any existing /fpm-status block (clean slate) sed -i '/location = \/fpm-status {/,/}/d' "$NGINX_LOCATIONS" # Append the correct block echo "$STATUS_BLOCK" >> "$NGINX_LOCATIONS" # Test and reload nginx if nginx -t; then nginx -s reload echo "nginx reloaded successfully with /fpm-status enabled." else echo "ERROR: nginx config test failed. Status block not applied." exit 1 fi
March 1Mar 1 Author On 11/30/2024 at 1:09 PM, bmartino1 said:no bridging, no bonding. Fix vhost service IP due to vhost getting a privatized MAC address and set a static assigned within the taps network.In my case eth0 is 192.168.2.x/24 and my machine is set to 192.168.2.254. With bridge off and bonding off (as this machine doesn't need it)My unifi network complains and i get phantom devices on Unraids Reboot. DHCP snooping and other layer 2/layer3 announces due to how unraids uses a bridge tap for docker and virtual machines. So I treat the vhost0@eth0 network tap as a service that I want a separate IP address assigned to.By default in v7 with br0 "bridging enabled macvlan will use shim bridge to make the macvlan connection... by default unraid ships with docker networks using ipvlan. Pro cons to each...The ipvlan type is best when connection to the physical network is not needed. Please read this on implementing an ipvlan network.The macvlan type of network allows direct connection to the physical network. Please read this on implementing a macvlan network.use ip a to see your interfaces. you will see chost#/shim-br# @ interface and will see that he ip address for your br#/eth# is the same which is the problem... so treat it as its own service. #!/bin/bash# Reset and configure vhost0 interface#(vhost for non bridge) shim-br0 is the new default sleep 20 #Disk array needs started, docker needs started for this to fix the bridge and set an ip... ip link set shim-br0 down # Bring vhost0 down ip addr flush dev shim-br0 # Remove any existing IPs #use static IP?: ip addr add 192.168.1.256/24 dev shim-br0 # Assign the desired IP #To use dhcp coment out the ip addre line. ip link set shim-br0 up # Bring vhost0 up#!/bin/bash# Reset and configure vhost0 interface ip link set vhost0 down # Bring vhost0 down ip addr flush dev vhost0 # Remove any existing IPs #use static IP?: ip addr add 192.168.1.254/24 dev vhost0 # Assign the desired IP#To use dhcp coment out the ip addre line. ip link set vhost0 up # Bring vhost0 up*chose one dhcp or static IP was able to get both working in beta...unfi example in logs:More a networking / unifi issues... as unifi is overzelaus in its ip snooping...Note this requires unraid advanced docker settings enabled:Due to a bug:https://product.unraid.net/p/muti-nic-macvlan-host-enabled-relapse-ip-added-docker-rc-script-issueI still don’t know how to reporduce on other systems… But inteh event other users experience this bug too...The FixYou need to either clear the statics.ini entry before flushing, or increase the sleep enough to ensure docker hasn't fired yet (fragile). The clean approach is to add the statics.ini removal to your user script:bash#!/bin/bash sleep 20 # Wait for docker services to start # Remove the statics.ini entry so the monitor doesn't fight us sed -i '/^shim-br0 .*/d' /var/local/emhttp/statics.ini # Also create the .down sentinel to suppress the monitor touch /var/tmp/shim-br0.down # Bring interface down ip link set shim-br0 down # Remove all existing IPs ip addr flush dev shim-br0 # Set static IP ip addr add 192.168.2.247/24 dev shim-br0 ip link set shim-br0 up # Re-register our desired IP back into statics.ini so it survives future docker restarts rm -f /var/tmp/shim-br0.downThe sed removes the .248 entry from statics.ini before the flush, so the monitor has nothing to restore. The touch /var/tmp/shim-br0.down is an extra belt-and-suspenders sentinel that some versions of the monitor check before acting.runnign this in stead seems to restore the static set on this sytem…How I under stand it for the root cause:Root Cause: Race Between Your User Script and Unraid's statics.ini MonitorThere are two separate things adding IPs to shim-br0, and they're fighting each other.The Sequence of Events14:45:51 — Unraid fires your user scripts in the background, including vhost-shimbridge-unifi fix (which has a sleep 20 inside it)14:45:54 — rc.docker start fires14:45:58 — rc.docker creates shim-br0, and adds 192.168.2.248/24 to it. Critically, it also calls add_entry "shim-br0 192.168.2.248/24 metric 0" — which appends a line to /var/local/emhttp/statics.ini~14:46:11 — Your user script wakes from sleep 20 and does: ip link set shim-br0 down → ip addr flush dev shim-br0 → ip addr add 192.168.2.247/24 dev shim-br0 → ip link set shim-br0 upAlmost immediately — Unraid's background monitor+ process (the statics.ini watcher, pids 2581/2591 visible in your top) detects that 192.168.2.248/24 is missing from shim-br0 and re-adds it — but now as a secondary address on top of your .247The result: .247 is primary (your script), .248 is secondary (the monitor restored it).Why This Only Affects This Systemdel_entry() in rc.docker does two things: it creates a .down sentinel file AND removes the entry from statics.ini. Your raw ip addr flush does neither — it just yanks the IP off the interface without telling the monitor. On other Unraid systems, you're presumably running the user script as the only thing managing shim-br0, but here DOCKER_ALLOW_ACCESS=yes with a br type network causes rc.docker to both create the shim and register it in statics.ini.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.