problem: OOM appears when building a private chain and starting to dig a mine. Memory keeps growing until the geth process is killed
< H2 > build the private chain of Ethernet Square < / H2 >Dockerfile
-----------------------------------
FROM ubuntu
LABEL version="1.0"
LABEL maintainer="test@outlook.com"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --yes software-properties-common
RUN add-apt-repository ppa:ethereum/ethereum
RUN apt-get update && apt-get install --yes geth
COPY genesis.json /home/root/genesis.json
RUN chown -R root:root /home/root/genesis.json
USER root
WORKDIR /home/root
ENTRYPOINT bash
-----------------------------------
- Docker
docker build -t eth_node .
- Docker
docker run --rm -it -p 8546:8545 -v /eth/data/node1:/home/root --name eth_dev_node1 eth_node
- /eth/data/node1/ genesis.json
``
{
"alloc": {
},
"config": {
"chainId": 1800,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"nonce": "0x000000000000002a",
"difficulty": "0x002000",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x",
"gasLimit": "0x2fefd8"
}
-
docker exec -it {cointainerId} /bin/bash
- geth
geth version 1.8.12-stable
-
geth --datadir /home/root/ init genesis.json
-
nohup geth --datadir /home/root/ --identity "NODE_1" --gcmode archive --rpc --rpccorsdomain "*" --networkid=1800 --rpc --rpcaddr 0.0.0.0 --rpcport "8545" --port "30303" --rpcapi "db,eth,net,web3,admin,personal,miner" --nodiscover --cache 16 &
- geth
geth attach geth.ipc
-
personal.newAccount("123456")
-
miner.start(1)
< H2 > OOM appears at the beginning of mining. Memory keeps growing until the kill geth process. Have you encountered this problem or something wrong with my configuration or startup commands? < / H2 >