We have a small VM which we're testing Kafka on. We keep running into disk full error and Kafka service stops. We have to delete `kafka-logs` and restart the Kafka service. What's the solution for this? This is the error we run into on the Kafka service:
Caused by: java.io.IOException: No space left on device
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.FileDispatcherImpl.write(Unknown Source)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.write(Unknown Source)
at sun.nio.ch.FileChannelImpl.write(Unknown Source)
at kafka.message.ByteBufferMessageSet.writeTo(ByteBufferMessageSet.scala:303)
at kafka.log.FileMessageSet.append(FileMessageSet.scala:297)
at kafka.log.LogSegment.append(LogSegment.scala:86)
at kafka.log.Log.append(Log.scala:386)
... 22 more
And:
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 59G 9.9G 46G 18% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/sda1 146M 44M 95M 32% /boot
/dev/sda5 4.9G 4.6G 0 100% /tmp
/dev/sda2 20G 1.2G 18G 7% /var
1) Can we make changes to log only ERROR or CRITICAL logs?
2) Is there a way Kafka can delete the logs on its own when the disk is almost full?
Please let me know. This is very important for us!
Thank you!