Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MongoDB使用docker的设备上没有剩余空间_Mongodb_Docker_Docker Compose - Fatal编程技术网

MongoDB使用docker的设备上没有剩余空间

MongoDB使用docker的设备上没有剩余空间,mongodb,docker,docker-compose,Mongodb,Docker,Docker Compose,我的MongoDB被卡住并返回以下错误: 2019-01-28T18:28:53.419+0000 E STORAGE [WTCheckpointThread] WiredTiger error (28) [1548700133:419188][1:0x7feecb0ae700], file:WiredTiger.wt, WT_SESSION.checkpoint: /data/db/WiredTiger.turtle.set: handle-open: open: No space left

我的MongoDB被卡住并返回以下错误:

2019-01-28T18:28:53.419+0000 E STORAGE  [WTCheckpointThread] WiredTiger error (28) [1548700133:419188][1:0x7feecb0ae700], file:WiredTiger.wt, WT_SESSION.checkpoint: /data/db/WiredTiger.turtle.set: handle-open: open: No space left on device
2019-01-28T18:28:53.419+0000 E STORAGE  [WTCheckpointThread] WiredTiger error (22) [1548700133:419251][1:0x7feecb0ae700], file:WiredTiger.wt, WT_SESSION.checkpoint: WiredTiger.wt: the checkpoint failed, the system must restart: Invalid argument
2019-01-28T18:28:53.419+0000 E STORAGE  [WTCheckpointThread] WiredTiger error (-31804) [1548700133:419260][1:0x7feecb0ae700], file:WiredTiger.wt, WT_SESSION.checkpoint: the process must exit and restart: WT_PANIC: WiredTiger library panic
2019-01-28T18:28:53.419+0000 F -        [WTCheckpointThread] Fatal Assertion 28558 at src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp 361
2019-01-28T18:28:53.419+0000 F -        [WTCheckpointThread]

***aborting after fassert() failure

2019-01-28T18:28:53.444+0000 F -        [WTCheckpointThread] Got signal: 6 (Aborted).
但是,我的磁盘有空间:

df-h

df-i

这将是我的docker创作:

version: "3"
services:

# MariaDB
    mariadb:
        container_name: mariadb
        image: mariadb
        ports: ['3306:3306']
        restart: always
        volumes:
            - /home/ubuntu/mysql:/var/lib/mysql
        environment:
            - "MYSQL_ROOT_PASSWORD=PasswordGoesHere"
        command:
            # - --memory=1536M
            - --wait_timeout=28800
            - --innodb_buffer_pool_size=1g
            - --innodb_buffer_pool_instances=4
            # - --innodb_buffer_pool_chunk_size=1073741824

# APACHE
    apache:
        container_name: apache
        image: apache-php7.1
        ports: ['80:80', '443:443']
        restart: always
        entrypoint: tail -f /dev/null
        volumes:
            - /home/ubuntu/apache2/apache-config:/etc/apache2/sites-available/
            - /home/ubuntu/apache2/www:/var/www/html/

# MONGODB
    mongodb:
        container_name: mongodb
        image: mongo
        ports: ['27017:27017']
        restart: always
        command:
            - --auth
        volumes:
            - /home/ubuntu/moongodb:/data/db

我的docker-compose.yml会有问题吗?因为我使用的是物理磁盘,而不是虚拟磁盘。我可以运行应用程序,1-2小时后mongo将再次失败。

看起来您的inode 100%都在使用中(从
df-I
输出)。试着去寻找和寻找。另外,最好确保docker守护程序使用的是生产级存储驱动程序(,)。

如果您在centos/RHEL/Amazon Linux中运行此驱动程序,您应该知道devicemapper在docker中发布inode时存在重大问题

即使你删减了整个docker系统,它仍然会保留很多索引节点,真正解决这个问题的唯一方法是基本上使docker内爆:

service docker stop
rm -rf /var/lib/docker
service docker start
这将释放所有inode

我在这方面花了很多时间,Docker实际上只完全支持UbuntuOverlay2,而devicemapper虽然可以工作,但在技术上不受支持。

Clean Docker cache-volumes&containers 对我来说,它是有效的:

docker system prune
然后

docker volume prune

或者在一行中:

docker system prune --volumes
要查看所有卷:
docker卷ls


为了显示docker磁盘的使用情况:
docker system df

我已经运行了
docker system pruner
,并且没有区别“看起来您的inode 100%都在使用中(从df-I输出)。”-这会是个问题吗?是的,inode是Linux/Unix/Mac文件系统的基本组件。这是一个很好的介绍。你能用@Avamore回复来完成你的信息吗?这两个信息都是响应所必需的。所以,我离开这里是为了解决我的疑问。我按照你说的做了,如果行得通的话,我们下次再见。:)你能用@akhan回复完成你的信息吗?这两个信息都是响应所必需的。所以,我离开是为了解决我的疑问。
docker volume prune
docker system prune --volumes