[squeak-dev] FileStreams Limit
Tony Garnock-Jones
tonyg at leastfixedpoint.com
Thu Feb 17 07:51:29 UTC 2022
On 2/17/22 08:20, Jörg Belger wrote:
> Is there a limit with file streams? I cannot open more than 238 on my macOSX. The 239th fails and Squeak runs with 100% cpu power. I changed then the method StandardFileStream>>open:forWrite: and removed the #retryWithGC:until:forFileNamed:, because it looked to me, that it does not much things. Now I get a <nil> back from the primitive.
There may be a per-process limit on the number of file descriptors. When
Squeak runs out, it is (I suspect) assuming that some unused file
handles exist on the heap, so it tries to GC, hoping that a collection
will close some unwanted file descriptors. Unfortunately if it really is
running up against the limit, this strategy won't help! (We should do
something better... but what?)
You might be able to see what the current limit is with `ulimit -a`.
If that's the cause of the problem, you could try to raise the limit at
the OS level - I'm afraid I don't have a mac to hand to try it myself
though.
Regards,
Tony
More information about the Squeak-dev
mailing list
|