You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Hongyuan Li (JIRA)" <ji...@apache.org> on 2017/06/14 03:29:00 UTC

[jira] [Created] (KAFKA-5444) Producer.send() will hang 8 hours,

Hongyuan Li created KAFKA-5444:
----------------------------------

             Summary: Producer.send() will hang 8 hours, 
                 Key: KAFKA-5444
                 URL: https://issues.apache.org/jira/browse/KAFKA-5444
             Project: Kafka
          Issue Type: Bug
            Reporter: Hongyuan Li


Frequent kafka old Producer open and close with cause the server hang with lots of error messages logged in the server.log .In my occasion,we may frequent open and close kafka producer,the procedure just like the code below:
{code}
Producer producer = ……
producer.send(List<KeyedMessage> lists);
producer.close();
{code}
the error is below:
{code}
2017-06-13 00:00:00,084] ERROR Processor got uncaught exception. (kafka.network.Processor)
java.lang.OutOfMemoryError: Direct buffer memory
	at java.nio.Bits.reserveMemory(Bits.java:658)
	at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)
	at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:306)
	at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:174)
	at sun.nio.ch.IOUtil.read(IOUtil.java:195)
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
	at org.apache.kafka.common.network.PlaintextTransportLayer.read(PlaintextTransportLayer.java:110)
	at org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:97)
	at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:71)
	at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:154)
	at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:135)
	at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:343)
	at org.apache.kafka.common.network.Selector.poll(Selector.java:291)
	at kafka.network.Processor.poll(SocketServer.scala:476)
	at kafka.network.Processor.run(SocketServer.scala:416)
	at java.lang.Thread.run(Thread.java:745)
{code}
the detailed error logs lists will be added in the attachment.
Any good idea to solve this?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)