Low-space signals in production environments
Andreas Raab
andreas.raab at gmx.de
Sat Feb 10 18:40:07 UTC 2007
Hi Guys -
I am just being very confused about the current behavior of Squeak in
the case of memory allocation failure. In my use case I have incoming
network requests which are handled at high I/O priority and need to
allocate memory based on the size of the request. Given a malformed
request, this can easily lead to an allocation failure which really
should raise an error, be caught and be done with.
However, there doesn't seem to be a way of handling low-space conditions
by the client. In the case of an allocation failure, all that appears
to be happening is that the low-space semaphore is being signaled with
the obvious assumption that the low-space watcher will preempt the
running process, make some space and continue. But equally obviously
this just can't work if the running process is at a higher priority than
the low-space process and since the running process recurses directly
into #basicNew: again this will bring your system to a screeching halt.
Since I can't possibly be the first person who noticed that (or at least
I really don't hope I am) my question is, how do people deal with that
situation in their production systems? I have never seen the issue
discussed but I would expect that it has come up on some Seaside or
other network-related lists.
Right now I'm just thinking to do something like signaling an
OutOfMemory error which as its default action would signal the lowspace
condition, leaving the client with the option to handle the request
differently if needed.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|