Question Plesk backend often not accessible when installing updates manually

brother4

Basic Pleskian
Server operating system version
Ubuntu Server 22.04.5 LTS
Plesk version and microupdate number
Plesk Obsidian 18.0.71 (Web Host Edition)
Hello, when I install a Plesk update manually and the installation is completed successfully, I can access my websites normally. But when I try to log in to the Plesk backend, I usually get an error message when I call up the login page and it is recommended to use the repair kit. If you then restart the server once, it works again immediately. Do you have any idea what this has to do with?
 
What I then see is that the sw-engine.service is not running (in the repair kit). Does this take longer after an update until it starts again? Even hours? This has not yet been observed with automatic updates.
 

Analysis Commands


cat /proc/sys/kernel/pid_max​


→ Shows the maximum number of process IDs (PIDs) available system-wide.


  • Output: 4194304
  • This is a very high limit, meaning the system allows up to 4.19 million simultaneous tasks.
  • It’s a kernel-level setting and not a practical limit for individual services.



systemctl show --property=DefaultTasksMax​


→ Displays the default maximum number of tasks (processes/threads) allowed per systemd service.


  • Output: DefaultTasksMax=1843
  • This limit is 15% of an internal systemd reference value, not of pid_max.
  • It restricts how many processes each systemd-managed service may spawn by default.



systemctl show sw-engine.service | grep TasksMax​


→ Displays the actual task limit (TasksMax) applied to the sw-engine.service.


  • Output: TasksMax=1843
  • This value is inherited from the DefaultTasksMax above.
  • It's likely too low for a service like sw-engine, which can spawn many PHP worker threads, especially during updates or load.



Probable Fix / Customization


mkdir -p /etc/systemd/system/sw-engine.service.d​


→ Creates a directory for systemd override configuration specific to sw-engine.service.


  • -p ensures all parent folders are created if they don't exist.



echo -e "[Service]\nTasksMax=4096" > /etc/systemd/system/sw-engine.service.d/override.conf​


→ Writes an override file that sets a new TasksMax limit for the service to 4096.


  • This tells systemd to allow up to 4096 processes/threads for sw-engine.



systemctl daemon-reexec​


→ Re-executes the systemd process itself (clears internal state).


  • Needed when changes affect system-wide behavior or PID handling.



systemctl daemon-reload​


→ Reloads systemd unit files and recognizes override changes.


  • Essential after creating or editing unit configuration files.



systemctl restart sw-engine​


→ Restarts the sw-engine service to apply the new TasksMax setting.




systemctl show sw-engine.service | grep TasksMax​


→ Verifies that the new task limit is active.


  • Expected Output: TasksMax=4096



✅ Summary​


This entire block of commands:


  • Analyzes current limits that may cause service startup failures (like status=219/CGROUP).
  • Applies a clean, persistent fix by overriding the default task limit for sw-engine.
  • Ensures Plesk services have enough headroom during updates or high load.
 
But I'm not entirely sure whether this is the solution to the problem. As there was a real loop when restarting the service tonight.

Ps. Too bad you can only edit here for 4 minutes, that's a bit short.

journalctl -u sw-engine -n 100 --no-pager
Jul 09 04:08:51 example.com systemd[1]: Failed to start Startup script for Panel sw-engine.
Jul 09 04:08:56 example.com systemd[1]: sw-engine.service: Scheduled restart job, restart counter is at 209.
Jul 09 04:08:56 example.com systemd[1]: Stopped Startup script for Panel sw-engine.
Jul 09 04:08:57 example.com systemd[1]: Starting Startup script for Panel sw-engine...
Jul 09 04:08:57 example.com systemd[1]: sw-engine.service: Main process exited, code=exited, status=219/CGROUP
Jul 09 04:08:57 example.com systemd[1]: sw-engine.service: Failed with result 'exit-code'.
Jul 09 04:08:57 example.com systemd[1]: Failed to start Startup script for Panel sw-engine.
 
A restart of sw-engine is immediate, there is no wait.

What's shown in /var/log/sw-cp-server/error_log and sw-engine.log at the time of failure?
 
@Bitpalast

/var/log/sw-cp-server/error_log - Many entries of:

2025/07/09 03:50:08 [crit] 4075683#0: *206 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "POST /modules/monitoring/public/index.php/id1234censored/query HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "127.0.0.1:8880"
2025/07/09 03:50:08 [crit] 4075683#0: *207 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "POST /modules/monitoring/public/index.php/id1234censored/query HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "127.0.0.1:8880"
2025/07/09 03:50:08 [crit] 4075683#0: *209 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "POST /modules/monitoring/public/index.php/id1234censored/query HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "127.0.0.1:8880"
2025/07/09 03:50:08 [crit] 4075683#0: *213 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "POST /modules/monitoring/public/index.php/id1234censored/query HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "127.0.0.1:8880"
2025/07/09 03:50:08 [crit] 4075683#0: *214 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "POST /modules/monitoring/public/index.php/id1234censored/query HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "127.0.0.1:8880"
2025/07/09 03:50:08 [crit] 4075683#0: *212 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "POST /modules/monitoring/public/index.php/id1234censored/query HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "127.0.0.1:8880"
2025/07/09 03:50:08 [crit] 4075683#0: *218 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "POST /modules/monitoring/public/index.php/id1234censored/query HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "127.0.0.1:8880"
2025/07/09 03:50:08 [crit] 4075683#0: *220 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "POST /modules/monitoring/public/index.php/id1234censored/query HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "127.0.0.1:8880"
2025/07/09 03:50:08 [crit] 4075683#0: *222 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "POST /modules/monitoring/public/index.php/id1234censored/query HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "127.0.0.1:8880"
2025/07/09 03:50:15 [crit] 4075683#0: *224 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: , request: "POST /modules/monitoring/public/index.php/id1234censored/query HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "127.0.0.1:8880"

cat /var/log/sw-cp-server/sw-engine.log (nothing more)

[09-Jul-2025 03:37:33] NOTICE: Terminating ...
[09-Jul-2025 03:37:33] NOTICE: exiting, bye-bye!
[09-Jul-2025 03:37:33] NOTICE: fpm is running, pid 4056871
[09-Jul-2025 03:37:33] NOTICE: ready to handle connections
[09-Jul-2025 03:37:33] NOTICE: systemd monitor interval set to 10000ms
[09-Jul-2025 03:48:12] NOTICE: Terminating ...
[09-Jul-2025 03:48:12] NOTICE: exiting, bye-bye!
[09-Jul-2025 04:11:53] NOTICE: fpm is running, pid 386
[09-Jul-2025 04:11:53] NOTICE: ready to handle connections
[09-Jul-2025 04:11:53] NOTICE: systemd monitor interval set to 10000ms
[09-Jul-2025 13:49:00] NOTICE: Terminating ...
[09-Jul-2025 13:49:00] NOTICE: exiting, bye-bye!
[09-Jul-2025 13:49:01] NOTICE: fpm is running, pid 250138
[09-Jul-2025 13:49:01] NOTICE: ready to handle connections
[09-Jul-2025 13:49:01] NOTICE: systemd monitor interval set to 10000ms
 
The missing socket means that the service isn't running. But that is expected as it is not running. You should find the cause why it is not running. Normally before that situation occurs, another error is logged, telling you WHY the service cannot be started or why it stopped. Have you considered scrolling back into the log to find that point in time where it happens?
 
Unfortunately there is nothing to be found anywhere. These are the first entries from the log. I don't understand it either. But the problem is reproducible after every Plesk update, which I install myself via https://example.com:8447/installer/summary.html.

The other user here had the same error but apparently also no entry about it: Issue - Error 502 when trying to log in

The problem has been occurring since the previous Plesk version Onyx. In the meantime, the server has also been reinstalled for an Ubuntu server update and Plesk has been cleanly installed with Obsidian. So that can't be the reason. Plesk does not find any errors in the repair program.
 
I was just able to reproduce it this way too, so the task limit doesn't seem to be the problem:

systemctl restart sw-engine.service
Job for sw-engine.service failed because the control process exited with error code.
See "systemctl status sw-engine.service" and "journalctl -xeu sw-engine.service" for details.


systemctl status sw-engine.service
● sw-engine.service - Startup script for Panel sw-engine
Loaded: loaded (/lib/systemd/system/sw-engine.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/sw-engine.service.d
└─override.conf
/usr/lib/systemd/system/sw-engine.service.d
└─respawn.conf
Active: activating (auto-restart) (Result: exit-code) since Wed 2025-07-09 20:10:59 CEST; 4s ago
Process: 348276 ExecStart=/usr/sbin/sw-engine-fpm --fpm-config /etc/sw-engine/sw-engine-fpm.conf -c /usr/local/psa/admin/conf/php.ini --nodaemonize --pid /run/sw-engine.pid (code=exited, status=219/CGROUP)
Process: 348277 ExecStopPost=/usr/bin/find /run/lock/lmlib/ -mindepth 1 -delete (code=exited, status=219/CGROUP)
Main PID: 348276 (code=exited, status=219/CGROUP)
Tasks: 3 (limit: 4096)
Memory: 283.3M
CGroup: /system.slice/sw-engine.service


cat /etc/systemd/system/sw-engine.service.d/override.conf
[Service]
TasksMax=4096

After that it worked again on 2 attempts. Is it possible that Plesk sometimes does something in the background and if an update takes place during this time, that it then hangs? Cronjobs or something similar?
 
Back
Top