Influxdb docker image memory issue

I have recently deployed influxdb using the official docker image. However, I will encounter write timeout whenever, the memory usage reaches 1Gb. The docker container is created with 8GB ram.

Belong is my config,

"Config": {
    "AttachStderr": false,
    "AttachStdin": false,
    "AttachStdout": false,
    "Cmd": [
        "influxd"
    ],
    "Domainname": "",
    "Entrypoint": [
        "/entrypoint.sh"
    ],
    "Env": [
        "INFLUXD_STORAGE_CACHE_MAX_MEMORY_SIZE=4294967296",
        "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
        "GOSU_VER=1.12",
        "INFLUXDB_VERSION=2.1.1",
        "INFLUX_CLI_VERSION=2.2.1",
        "INFLUX_CONFIGS_PATH=/etc/influxdb2/influx-configs",
        "INFLUXD_INIT_PORT=9999",
        "INFLUXD_INIT_PING_ATTEMPTS=600",
        "DOCKER_INFLUXDB_INIT_CLI_CONFIG_NAME=default"
    ],
    "ExposedPorts": {
        "8086/tcp": {}
    },
    "Hostname": "9e338154d88e",
    "Image": "influxdb:latest",
    "Labels": {
        "com.docker.swarm.node.id": "vcm3hdheg7m1r6vnod6xdgyum",
        "com.docker.swarm.service.id": "s5385gxt9pnbb55y595yyj6ur",
        "com.docker.swarm.service.name": "influx",
        "com.docker.swarm.task": "",
        "com.docker.swarm.task.id": "zodo5rzedn0q7w00nfidx1z43",
        "com.docker.swarm.task.name": "influx.2.zodo5rzedn0q7w00nfidx1z43"
    },
    "OnBuild": null,
    "OpenStdin": false,
    "StdinOnce": false,
    "Tty": false,
    "User": "",
    "Volumes": {
        "/etc/influxdb2": {},
        "/var/lib/influxdb2": {}
    },
    "WorkingDir": ""
},

Hello @moxlotus,
Can you please share the exact error you get?
Is your InfluxDB config the default?
Can you share more info on your container creation? Steps to reproduce?
Thank you.