I have linux box with 5Gb of memory:

osboxes@osboxes ~/node1 $ free
              total        used        free      shared  buff/cache   available
Mem:        5176876      158360     3536464      226748     1482052     4751712

This is my genesis.json:

    "config": {
        "chainId": 15,
        "homesteadBlock": 0,
        "eip155Block": 0,
        "eip158Block": 0
    "difficulty": "2000",
    "gasLimit": "2100000",
    "alloc": {
        "7df9a875a174b3bc565e6424a0050ebc1b2d1d82": { "balance": "300000" },
        "f41c74c9ae680c1aa78f42e5647a62f353b7bdde": { "balance": "400000" }

This is how I initialize it:

geth --datadir . init genesis.json

And i open console

geth --datadir . console

Then I start miner and get this crash:

ERROR[07-10|15:56:35] Failed to generate mapped ethash dataset epoch=1 err="cannot allocate memory"
runtime: out of memory: cannot allocate 2164260864-byte block (128057344 in use)
fatal error: out of memory

How much memory would be enough?

  • Hi Stepan. Does the output of free agree with /proc/meminfo? (I don't know the answer, I'm just clutching at straws... ). You'll need just over 2Gb to generate the DAG file, but you seem to have that amount... Jul 10 '17 at 21:17
  • Yes. free gives correct number, this is wmvare box. Jul 10 '17 at 21:22

I had the same problem on Windows 10, I fixed it by installing the 64bit version of Geth.

You can try starting geth with the following parameter:


this should avoid, that geth generates two DAGs at the same time which may cause memory issues.


The reason is most probably is that this is 32bit version, which always crashes during mining, because it needs more memory then it is designed for. Use 64bit version for mining.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.