DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 10th August 2017
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default Cannot allocate X bytes of memory (of type "heap").

Hi,

I am attempting to set up Yaws (an Erlang web server) but when installing some of the prerequisites I ran into this problem:
$ ./rebar build-plt
Code:
==> erlsom (build-plt)
eheap_alloc: Cannot allocate 71302344 bytes of memory (of type "heap").

Crash dump is being written to: erl_crash.dump...done
It looks like the OpenBSD defaults are too restrictive or are tuned for a much lower resource machine.

I've made some changes to /etc/login.conf resulting in:
$ ulimit -a
Code:
time(cpu-seconds)    unlimited
file(blocks)         unlimited
coredump(blocks)     unlimited
data(kbytes)         1572864
stack(kbytes)        16384
lockedmem(kbytes)    647766
memory(kbytes)       1921116
nofiles(descriptors) 2048
processes            256
But that hasn't helped with this particular memory constraint. I suppose there might be a way to allow significant programs to have access to the machine's resources by setting values in /etc/sysctl.conf?

Does anyone have any tuning advice or know of any references that can be shared?

Last edited by hanzer; 10th August 2017 at 01:43 AM. Reason: punctuation
Reply With Quote
  #2   (View Single Post)  
Old 10th August 2017
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default

It looks like it was a constraint that could be fiddled with ulimit. The ~71MB value was a bit misleading. Top showed that Beam (the Erlang VM) was using the full 1.5GB so I guess the memory allocation that failed was one of many allocations.

The immediate solution was to set $ ulimit -d $(ulimit -dH) and run again. Some research into Beam resource management is probably needed to get the setup tuned for resilient operation...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between"arp info overwritten" and " duplicate IP address " varag OpenBSD Security 1 6th April 2015 02:57 PM
How to replace "ectags" with "ctags"? fender0107401 OpenBSD Packages and Ports 5 16th April 2013 10:01 AM
Fixed "xinit" after _7 _8, "how" here in case anyones' "X" breaks... using "nvidia" jb_daefo Guides 0 5th October 2009 09:31 PM
"Thanks" and "Edit Tags". diw Feedback and Suggestions 2 29th March 2009 12:06 AM
Installation master "disk" using USB memory stick, dd? peterg22 FreeBSD Installation and Upgrading 7 14th October 2008 05:18 PM


All times are GMT. The time now is 04:56 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick