deadlock sending a large (~200MB) file from server to client

michi michi at cs.stanford.edu
Mon Sep 19 03:39:29 EDT 2011


Hi Norman,

Thank you for your suggestion! I'll look into ChunkedWriteHandler. I'm
still curious why my code doesnt work correctly, though...

Thanks!
--Michi

On Sun, Sep 18, 2011 at 11:08 PM, Norman Maurer-2 [via Netty Forums
and Mailing Lists] <ml-node+s685743n6807324h65 at n2.nabble.com> wrote:
> Hi there,
>
> why you not use ChunkedWriteHandler for this ? This is exactly what it is
> for...
>
> Have a look at this example code:
> http://docs.jboss.org/netty/3.2/xref/org/jboss/netty/example/http/file/HttpStaticFileServerHandler.html
> http://docs.jboss.org/netty/3.2/xref/org/jboss/netty/example/http/file/HttpStaticFileServerPipelineFactory.html
>
> Bye,
> Norman
>
>
> 2011/9/19 michi <[hidden email]>:
>> Hello,
>>
>> I'm trying to use netty to send large files (~200MB) from server to client
>> over HTTP. I followed Trustin's suggestion here and used
>> ChannelFutureListener to send files in chunks.
>>
>> http://www.jboss.org/netty/community#nabble-td2952981|a2953779
>>
>> However, write() gets stuck once in a while, and I'm not sure what's
>> causing
>> the deadlock. I have a simple program that reproduces the issue:
>>
>>
>> https://github.com/m1ch1/netty-playground/blob/master/PrimaryServerHandler.java#L116
>>
>> Am I using ChannelFutureListener incorrectly?
>>
>> Thanks!
>> --Michi
>>
>> --
>> View this message in context:
>> http://netty-forums-and-mailing-lists.685743.n2.nabble.com/deadlock-sending-a-large-200MB-file-from-server-to-client-tp6807268p6807268.html
>> Sent from the Netty User Group mailing list archive at Nabble.com.
>> _______________________________________________
>> netty-users mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/netty-users
>>
> _______________________________________________
> netty-users mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/netty-users
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://netty-forums-and-mailing-lists.685743.n2.nabble.com/deadlock-sending-a-large-200MB-file-from-server-to-client-tp6807268p6807324.html
> To unsubscribe from deadlock sending a large (~200MB) file from server to
> client, click here.


--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/deadlock-sending-a-large-200MB-file-from-server-to-client-tp6807268p6807484.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list