RejectedSoftware Forums

Sign up

Out of memory on AWS.

Hi

I am trying to run a vibe application on Amazone web service (AWS).

But at startup it gets killed because it run out of memory.

It seems that dmd use lots of memory when it compiles.

Is the a way to tell dmd to use less memory ?

Knud

Re: Out of memory on AWS.

Am 19.11.2012 14:32, schrieb Knud Sørensen:

Hi

I am trying to run a vibe application on Amazone web service (AWS).

But at startup it gets killed because it run out of memory.

It seems that dmd use lots of memory when it compiles.

Is the a way to tell dmd to use less memory ?

Knud

Unfortunately, this is more or less inevitable right now. You could vote for these bugs:

http://d.puremagic.com/issues/show_bug.cgi?id=1382
http://d.puremagic.com/issues/show_bug.cgi?id=6498

as CTFE uses up most memory during compilation.

The workaround is to run vibe build on a normal machine or on a VM with enough memory and then
upload the resulting ./app executable to the server. It has to have the same, or at least a
similar operating system, of course. This also has the advantage that no source code needs to be
stored on the server.

Re: Out of memory on AWS.

On 2012-11-19 15:36, Sönke Ludwig wrote:

Am 19.11.2012 14:32, schrieb Knud Sørensen:

Hi

I am trying to run a vibe application on Amazone web service (AWS).

But at startup it gets killed because it run out of memory.

It seems that dmd use lots of memory when it compiles.

Is the a way to tell dmd to use less memory ?

Knud

Unfortunately, this is more or less inevitable right now. You could vote for these bugs:

http://d.puremagic.com/issues/show_bug.cgi?id=1382
http://d.puremagic.com/issues/show_bug.cgi?id=6498

as CTFE uses up most memory during compilation.

The workaround is to run vibe build on a normal machine or on a VM with enough memory and then
upload the resulting ./app executable to the server. It has to have the same, or at least a
similar operating system, of course. This also has the advantage that no source code needs to be
stored on the server.

It is the same OS but one is 32 bit and the other 64 bit.

I have tried adding "dflags": ["-m64"] to package.json
but the linker can't find most of the libraries.

Knud

Re: Out of memory on AWS.

I have tried adding "dflags": ["-m64"] to package.json
but the linker can't find most of the libraries.

I guess you could try to setup a chroot environment and install all missing things there... or
copy the missing libs over from the Amazon box. But since that could get a little hairy, I would
rather install a 64-bit OS somewhere.