From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075325006596.tru64-unix-managers.marc@archive.invalid> From: Stephen Campbell Date: Mon, 13 Nov 1995 13:21:00 +0000 To: tru64-unix-managers Subject: pthread_create: out of space X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075325006596 We have a multi-threaded application running under DEC Unix version 3.2. It's a classic server, and each request causes a new thread to be created. Threads typically live for 5 to 10 minutes; never more than 20. As soon as a thread is created, it is pthread_detached by the main loop. On a normal day there may be 20,000 requests (threads) created and terminated. At busy periods of the day, we typically see 250 or 300 threads active at a time. Under peak load, we often see pthread_create failing with errno = ENOMEM. We can't figure out why. We have searched in vain for a traditional memory leak (though we might have missed one). The overall size of the process does not seem excessive; it might reach 20MB as shown by 'ps l'. Our sysconfigtab has the following: proc: per-proc-stack-size = 4194304 which we think is large enough. The machine has 128MB of real memory, and though it does a number of other functions (heavy sendmail, ftpd, etc) it does not seem to critically short of swap space as shown by swapon -s. We would be interested in any hints as to why this application is running out of space. Steve Campbell