[ 
https://issues.apache.org/jira/browse/KAFKA-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137796#comment-14137796
 ] 

nicu marasoiu edited comment on KAFKA-1282 at 9/18/14 5:25 AM:
---------------------------------------------------------------

Indeed, ack=1 solves it for most times but not for all:
- in 6 of 7 tests it gets a reset by peer and a socket timeout on fetch meta, 
than re connects and sends message.
- in one test, after leaving one night the laptop, I entered:
sdfgsdfgdsfg --> that never returned, no exception, nothing at all reported
aaaaaaaaaaa
aaaaaaaaaaa
ff
ff

The "ok" flow, which reproduces most of the time with ack=1 is (sometimes with 
just one of the 2 expcetions):
gffhgfhgfjfgjhfhjfgjhf
[2014-09-18 08:22:35,057] WARN Failed to send producer request with correlation 
id 43 to broker 0 with data for partitions [topi,0] 
(kafka.producer.async.DefaultEventHandler)
java.io.IOException: Connection reset by peer
        at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
..
        at 
kafka.producer.async.ProducerSendThread.run(ProducerSendThread.scala:44)
[2014-09-18 08:22:36,663] WARN Fetching topic metadata with correlation id 44 
for topics [Set(topi)] from broker [id:0,host:localhost,port:9092] failed 
(kafka.client.ClientUtils$)
java.net.SocketTimeoutException
        at 
sun.nio.ch.SocketAdaptor$SocketInputStream.read(SocketAdaptor.java:226)
..
[2014-09-18 08:22:36,664] ERROR fetching topic metadata for topics [Set(topi)] 
from broker [ArrayBuffer(id:0,host:localhost,port:9092)] failed 
(kafka.utils.Utils$)
kafka.common.KafkaException: fetching topic metadata for topics [Set(topi)] 
from broker [ArrayBuffer(id:0,host:localhost,port:9092)] failed
        at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:71)
..
Caused by: java.net.SocketTimeoutException
        at 
sun.nio.ch.SocketAdaptor$SocketInputStream.read(SocketAdaptor.java:226)
        .. 
kafka.network.BoundedByteBufferReceive.readCompletely(BoundedByteBufferReceive.scala:29)
        at kafka.network.BlockingChannel.receive(BlockingChannel.scala:108)
        at kafka.producer.SyncProducer.liftedTree1$1(SyncProducer.scala:74)
        at 
kafka.producer.SyncProducer.kafka$producer$SyncProducer$$doSend(SyncProducer.scala:71)
        at kafka.producer.SyncProducer.send(SyncProducer.scala:112)
        at kafka.client.ClientUtils$.fetchTopicMetadata(ClientUtils.scala:57)
        ... 12 more
gffhgfhgfjfgjhfhjfgjhf


was (Author: nmarasoi):
Indeed, ack=1 solves it for most times but not for all:
- in 6 of 7 tests it gets a reset by peer and a socket timeout on fetch meta, 
than re connects and sends message.
- in one test, after leaving one night the laptop, I entered:
sdfgsdfgdsfg --> that never returned, no exception, nothing at all reported
aaaaaaaaaaa
aaaaaaaaaaa
ff
ff


> Disconnect idle socket connection in Selector
> ---------------------------------------------
>
>                 Key: KAFKA-1282
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1282
>             Project: Kafka
>          Issue Type: Bug
>          Components: producer 
>    Affects Versions: 0.8.2
>            Reporter: Jun Rao
>            Assignee: nicu marasoiu
>              Labels: newbie++
>             Fix For: 0.9.0
>
>         Attachments: 1282_brushed_up.patch, 
> KAFKA-1282_Disconnect_idle_socket_connection_in_Selector.patch
>
>
> To reduce # socket connections, it would be useful for the new producer to 
> close socket connections that are idle. We can introduce a new producer 
> config for the idle time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to