我已经看到了我的服务器的奇怪的行为,首先我看了日志文件/var/log/mongodb/mongodb.log 。 在那里我看到了下一行:
Wed Jan 7 16:33:31 [FileAllocator] allocating new datafile /var/lib/mongodb/salesg_call_log.1, filling with zeroes... Wed Jan 7 16:33:31 [FileAllocator] FileAllocator: posix_fallocate failed: errno:28 No space left on device falling back Wed Jan 7 16:33:31 [FileAllocator] error failed to allocate new file: /var/lib/mongodb/salesg_call_log.1 size: 33554432 errno:28 No space left on device Wed Jan 7 16:33:31 [FileAllocator] will try again in 10 seconds
我想这意味着我的服务器上没有可用的磁盘空间。
然后我input命令df -h :
Filesystem Size Used Avail Use% Mounted on rootfs 9.3G 2.5G 6.5G 28% / udev 10M 0 10M 0% /dev tmpfs 55M 92K 55M 1% /run /dev/mapper/jatare--web--front_system-root 9.3G 2.5G 6.5G 28% / tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 109M 0 109M 0% /run/shm /dev/xvda1 134M 18M 109M 15% /boot
我的MongoDB文件存储在/var/lib/mongodb/ ,并且有足够的空间存储数据。
然后,我刚刚重新启动了mongodb服务和apache2服务,现在一切正常。 但是我害怕在不久的将来也会遇到同样的情况。
所以我的问题是什么问题以及如何解决?
对于@NickW:
root@jatare-web-front:~# df -i Filesystem Inodes IUsed IFree IUse% Mounted on rootfs 593408 46255 547153 8% / udev 57496 273 57223 1% /dev tmpfs 69353 189 69164 1% /run /dev/mapper/jatare--web--front_system-root 593408 46255 547153 8% / tmpfs 69353 3 69350 1% /run/lock tmpfs 69353 2 69351 1% /run/shm /dev/xvda1 72720 27 72693 1% /boot
我发现的唯一解决scheme是在x32机器上的MongoDB中约2GB的限制。 MongoDB在x32操作系统上不能存储超过2GB的数据: http : //blog.mongodb.org/post/137788967/32-bit-limitations
但我不确定那是否是问题。