<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p style="line-height: 100%; margin-bottom: 0cm">Hello,</p>
<p style="line-height: 100%; margin-bottom: 0cm">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).</p>
<p style="line-height: 100%; margin-bottom: 0cm">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:</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm"><font face="DejaVu
Sans Mono, monospace"><font style="font-size: 8pt" size="1">"processes": {</font></font></p>
<p style="line-height: 100%; margin-bottom: 0cm"><font face="DejaVu Sans Mono, monospace"><font style="font-size: 8pt" size="1">"max": 40,</font></font></p>
<p style="line-height: 100%; margin-bottom: 0cm"><font face="DejaVu Sans Mono, monospace"><font style="font-size: 8pt" size="1">"spare": 20,</font></font></p>
<p style="line-height: 100%; margin-bottom: 0cm"><font face="DejaVu Sans Mono, monospace"><font style="font-size: 8pt" size="1">"idle_timeout": 60</font></font></p>
<p style="line-height: 100%; margin-bottom: 0cm"><font face="DejaVu
Sans Mono, monospace"><font style="font-size: 8pt" size="1">},</font></font></p>
<p style="line-height: 100%; margin-bottom: 0cm"><font face="DejaVu
Sans Mono, monospace"><font style="font-size: 8pt" size="1">"limits": {</font></font></p>
<p style="line-height: 100%; margin-bottom: 0cm"><font face="DejaVu Sans Mono, monospace"><font style="font-size: 8pt" size="1">"timeout": 1200,</font></font></p>
<p style="line-height: 100%; margin-bottom: 0cm"><font face="DejaVu Sans Mono, monospace"><font style="font-size: 8pt" size="1">"requests": 10000</font></font></p>
<p style="line-height: 100%; margin-bottom: 0cm"><font face="DejaVu
Sans Mono, monospace"><font style="font-size: 8pt" size="1">},</font></font></p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm">The version of Unit is 1.29.1, the version of PHP is 8.2.3.<br>
</p>
<p style="line-height: 100%; margin-bottom: 0cm">External access to the application is proxied by HAProxy with sticky sessions configured. Direct access to NGINX servers is possible too (with another URLs).</p>
<p style="line-height: 100%; margin-bottom: 0cm">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.</p>
<p style="line-height: 100%; margin-bottom: 0cm">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.</p>
<p style="line-height: 100%; margin-bottom: 0cm">Any ideas?</p>
<p style="line-height: 100%; margin-bottom: 0cm">Best regards,</p>
<p style="line-height: 100%; margin-bottom: 0cm">Peter</p>
<p style="line-height: 100%; margin-bottom: 0cm"><br>
</p>
<style type="text/css">p { line-height: 115%; margin-bottom: 0.25cm; background: transparent }</style>
</body>
</html>