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, Nov 30, 2022 at 06:38:41PM +0100, Rhialto wrote:
> 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

Yeah, I did some digging when I also tripped over this. I also just bumped
MAXLWP in lwp.h. And yes, current is somewhat different:

https://marc.info/?m=165780650613579

-- 
Paul Ripke
"Great minds discuss ideas, average minds discuss events, small minds
 discuss people."
-- Disputed: Often attributed to Eleanor Roosevelt. 1948.


Home | Main Index | Thread Index | Old Index