NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Possible causes for "Resource temporarily unavailable"?



On Wed 30 Nov 2022 at 11:24:15 -0300, Silas wrote:
> Well, not sure if number of LWPs is the problem, but I thought it was a
> good idea to add this information here. It would explain why sometimes
> one of my firefox instances gets killed randomly.

I suspect indeed that the LWPs are the problem. And what's worse, the
ulimit setting is not per-process, but per-user. So with Firefox already
using 931 of them, your other processes have only 69 left.

I built a custom kernel just to increase the maximum. I think -current
makes this a bit easier but for 9.x you need a small change in
/src/sys/sys/lwp.h:

#define MAXLWP          8192

The kernel config file is pretty simple, but it seemed somehow uncertain
that the MAXLWP setting there is really active every time "lwp.h" is
included (hence the patch to it):

include "arch/amd64/conf/GENERIC"
#ident "MAXLWP8192"
options MAXLWP=8192
options MAXUPRC=2048


-Olaf.
-- 
___ "Buying carbon credits is a bit like a serial killer paying someone else to
\X/  have kids to make his activity cost neutral." -The BOFH    falu.nl@rhialto

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index