Problem Note 32020: java.lang.OutOfMemoryError: Unable to create new native thread
In a Solaris environment that utilizes zones, a system may not be able to create new processes. An example of the type of error that may be seen is:
  java.lang.OutOfMemoryError: unable to create new native thread
The above error message was logged by the application server, but other messages could be seen. Any sort of message or error indicating the inability for the system to create new threads or processes is the hint that the zone configuration needs to be modified.
There is a default limit set on lightweight processes for the zones in our environment.
You can review at the process limits by entering the following command from the global zone (it only works in the global or master zone):
zonecfg -z<zone-name> info
Look for an attribute named zone.max-lwps. Output should look similar to
this:
  rctl:
name: zone.max-lwps
value:   (priv=privileged,limit=300,action=deny)
When certain applications are run in a zone with this setting, the system can meet the number of lightweight processes allowed.
To circumvent this, change or remove the limit with the following command:
  zonecfg -z <zone-name>
  remove rctl name=zone.max-lwps
  exit
You will need to restart the zone in order for this new configuration to be read.
Operating System and Release Information
| SAS System | N/A | Solaris | | |
| Solaris for x64 | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
In a Solaris environment that utilizes zones, a system may not be able to create new processes.
| Type: | Problem Note |
| Priority: | medium |
| Date Modified: | 2008-05-07 10:54:52 |
| Date Created: | 2008-05-07 08:31:27 |