Strange Unit failure

Peter TKATCHENKO p.tkatchenko at bimp.fr
Tue Jun 20 09:31:17 UTC 2023


Hello,

We had a strange failure of Unit yesterday. I would like to get your advise about a possible reason of the problem (and how to avoid it in the future).

We use Unit as PHP application server on FreeBSD 13.2 (in a jail). Unit is behind Nginx (connected using unix socket). PHP configuration of Unit is as follows:


"processes": {

"max": 40,

"spare": 20,

"idle_timeout": 60

},

"limits": {

"timeout": 1200,

"requests": 10000

},


The version of Unit is 1.29.1, the version of PHP is 8.2.3.

External access to the application is proxied by HAProxy with sticky sessions configured. Direct access to NGINX servers is possible too (with another URLs).

Yesterday we began to (randomly) get 503 errors on different pages of the application. The same page could be OK for one user, but failed with 503 error for other user. The source of these errors was Unit. We could isolate the problems and solved them restarting Unit service on 2 servers (of 3). We did not find any useful information in Unit logs. Nothing interesting in NGINX logs neither.

I suppose that some Unit workers were in strange semi-failured state, but the master process did not kill them and continued to send them the requests.

Any ideas?

Best regards,

Peter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/unit/attachments/20230620/3e6a6572/attachment.htm>


More information about the unit mailing list