Technical article 104908

"Fork failed" messages appear on the system console.

OpenServer 5.0.0

Written · Last revised

Problem

This message appears on the system console:

Fork failed: Command[scoterm]System Error was: Resource temporarily unavailable

Solution

This message is usually caused by running out of virtual memory
and can be easily remedied by adding more swap space.  You must
be in multiuser mode.  These commands (executed as root) will
add approximately 30MB of virtual memory:
# touch /swap
# swap -a /swap 0 60000

The /swap file will only grow according to the actual swap requirements and may not actually consume 30MB of disk.

In order to avoid having to reissue this command every time the system is rebooted, simply add the above commands to the /etc/rc.d/8/userdef file.

Virtual memory is tracked via the kernel variable availsmem,
which tracks the available virtual memory in 4K pages.  This
variable is handled conservatively, and normally reserves more
swap space than will actually be needed.  Programs that use
shared libraries will decrement availsmem.  Programs that use
the mmap(S) facility and map privately also require a large
"reserve" of virtual memory.

To monitor availsmem, use the crash(ADM) utility:

# crash
dumpfile = /dev/mem, namelist = /unix, outfile = stdout
> od -d availsmem
f0175120:  0000011682
> q             ^^^^^  11,682 4K pages ~ 45.63 MB

See also

The swap(ADM) manual page for additional information.

From the Xinuos technical article database, record 104908. Reproduced with permission. The original is at www.sco.com/ta/104908, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.