]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Deal quicker with dead event loop processes. End-users need to run 'composer install'.
authorBram Matthys <redacted>
Mon, 8 May 2023 06:29:04 +0000 (08:29 +0200)
committerBram Matthys <redacted>
Mon, 8 May 2023 06:34:42 +0000 (08:34 +0200)
Long story:
In the panel we have some background tasks, like the live "Network Overview", the
"Logs" live view, but also the notification that works on every page behind-the-scenes,
that will show popups for server errors/warnings.
Depending on the webserver and PHP backend, but in particular with fast cgi modules,
these PHP processes may not see the browser as being "gone" until they actually send
something, so we send something when $rpc->eventloop() returns, which is guaranteed to
return at least every 10 seconds (if there is no data, quicker otherwise).

This means that, until now, it took up to 10 seconds for these PHP processes to die.
If you are quickly browsing from one page to the other, then - especially with the
main overview or the logs page which causes 2 processes - you could hit your PHP max
processes or max workers, especially if you have a relatively low limit of like 10.

Upstream commit of unrealircd-rpc-php changes the returning behavior (when idle) from
every 10 seconds to every 2 seconds, which should help a lot.

If you still have situations where pages don't load at all or get max processes reached
in your webserver logs then you should really bump your PHP process/workers limit.
There's no way around that :).

composer.lock

index ae74b7793169623a29debee9558aef917975cacf..92161d07022a41641df035f8013008a31caf81c1 100644 (file)
             "source": {
                 "type": "git",
                 "url": "https://github.com/unrealircd/unrealircd-rpc-php.git",
-                "reference": "4724b28b1c5d862414db89a8671c4e918cad70d1"
+                "reference": "94e1459d52b429e3e5d43d36fabada6d0801bdc5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/unrealircd/unrealircd-rpc-php/zipball/4724b28b1c5d862414db89a8671c4e918cad70d1",
-                "reference": "4724b28b1c5d862414db89a8671c4e918cad70d1",
+                "url": "https://api.github.com/repos/unrealircd/unrealircd-rpc-php/zipball/94e1459d52b429e3e5d43d36fabada6d0801bdc5",
+                "reference": "94e1459d52b429e3e5d43d36fabada6d0801bdc5",
                 "shasum": ""
             },
             "require": {
                 "issues": "https://github.com/unrealircd/unrealircd-rpc-php/issues",
                 "source": "https://github.com/unrealircd/unrealircd-rpc-php/tree/main"
             },
-            "time": "2023-05-05T13:11:38+00:00"
+            "time": "2023-05-08T06:28:24+00:00"
         }
     ],
     "packages-dev": [],