# Server 5.2.16 shut down unexpected (out of memory)

**URL:** https://forum.servoy.com/t/server-5-2-16-shut-down-unexpected-out-of-memory/17642
**Category:** Classic Servoy
**Created:** [November 22, 2013, 10:21am UTC](https://forum.servoy.com/t/server-5-2-16-shut-down-unexpected-out-of-memory/17642 "2013-11-22T10:21:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)
#### Post date: [November 22, 2013, 10:21am UTC](https://forum.servoy.com/t/server-5-2-16-shut-down-unexpected-out-of-memory/17642/1 "2013-11-22T10:21:48Z")

</div>

Hi,  
I have running a Servoy 5.2.16 Application Server on a Debian Virtual Server.

```auto
Operating System Information
os.name=Linux
os.version=2.6.32-042stab078.27
os.arch=i386
java.version=1.6.0_26

```

From time to time (two, three times a month) the Servoy App Server shut down unexpected.  
This is what I get in the error log file:

```auto
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32756 bytes for ChunkPool::allocate
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
# Out of Memory Error (allocation.cpp:211), pid=662, tid=581401456
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) Server VM (20.1-b02 mixed mode linux-x86 )

--------------- T H R E A D ---------------

Current thread (0x09311c00): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=670, stack(0x229f8000,0x22a78000)]

Stack: [0x229f8000,0x22a78000], sp=0x22a75050, free space=500k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)

```

The Servoy Server settings are:

```auto
java -Djava.awt.headless=true -Xmx1024m -Xms96m -XX:MaxPermSize=1280m -classpath .:lib/ohj-je

```

The Debian Server memory output is:

```auto
MemTotal: 6291456 kB
MemFree: 5429256 kB
Cached: 63188 kB
Active: 671828 kB
Inactive: 183920 kB
Active(anon): 630860 kB
Inactive(anon): 161700 kB
Active(file): 40968 kB
Inactive(file): 22220 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 16 kB
Writeback: 0 kB
AnonPages: 792560 kB
Shmem: 2560 kB
Slab: 6408 kB
SReclaimable: 1872 kB
SUnreclaim: 4536 kB

total used free shared buffers cached
Mem: 6291456 862752 5428704 0 0 63268
-/+ buffers/cache: 799484 5491972
Swap: 0 0 0

```

For me the Debian Server has enough RAM and free memory, or?  
Does anybody have an idea?

Regards  
Thomas

---

<div class="post-metadata">

### Author: ![deezzub](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@deezzub](https://forum.servoy.com/u/deezzub)
#### Post date: [November 22, 2013, 10:39am UTC](https://forum.servoy.com/t/server-5-2-16-shut-down-unexpected-out-of-memory/17642/2 "2013-11-22T10:39:39Z")

</div>

> tgs:
> 
> ```auto
> # There is insufficient memory for the Java Runtime Environment to continue.
> 
> ```

# Native memory allocation (malloc) failed to allocate 32756 bytes for ChunkPool::allocate

# Possible reasons:

# The system is out of physical RAM or swap space

# In 32 bit mode, the process size limit was hit

# Possible solutions:

# Reduce memory load on the system

# Increase physical memory or swap space

# Check if swap backing store is full

> ```auto
> 
> The Debian Server memory output is:
> 
> ```
> 
> SwapTotal: 0 kB  
> SwapFree: 0 kB

Swap: 0 0 0

> ```auto
> 
> Does anybody have an idea?
> 
> ```

Maybe you need a swap partition.

---

<div class="post-metadata">

### Author: ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)
#### Post date: [November 22, 2013, 4:05pm UTC](https://forum.servoy.com/t/server-5-2-16-shut-down-unexpected-out-of-memory/17642/3 "2013-11-22T16:05:25Z")

</div>

You are hitting the 32bit memory limit of the OS

---

<div class="post-metadata">

### Author: ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)
#### Post date: [November 25, 2013, 7:34am UTC](https://forum.servoy.com/t/server-5-2-16-shut-down-unexpected-out-of-memory/17642/4 "2013-11-25T07:34:41Z")

</div>

Thank you for the reply!

@deezzub  
The Hosting company don’t offers Swap partitions for Virtual Server.

@Harjo  
You’re right!

I change now to a Dedicated Root Server with a 64 bit OS (Debian) and Swap partition.

Regards  
Thomas
