Hi Matthew, sorry for the late answer, I was quite busy.
So it's not working neither with the network_default_read_size option you gave me, and I'm not using libevent. For the context, it's a SI (XEP-0096) file transfer, I'm sending the file (~400 Mio) and I'm forcing the use of the proxy for the test. My chunks have a size of 2**16 (64 Kio) when disconnection occurs. If I set a size of 4096, there is no problem. I'm sending the file, so Gajim is actually not in cause here. If I do a direct connection I have no problem neither. Here is the significant part of the logs: --- logs socket debug server.lua: accepted new client connection from 127.0.0.1:42662 to 5000 mod_proxy65 debug SOCKS5 greeting complete mod_proxy65 debug SOCKS5 target connected for session e83c1d0c64441f3a22a5f74a27d4f7dd17a8c066 c2s1b3e530 debug Received[c2s]: <iq id='H_44' type='result' to='go...@necton3.int/SàT' from='lou...@necton3.int/Gajim'> necton3.int:log_events debug necton3.int firing event: pre- iq/full necton3.int:log_events debug necton3.int firing event: iq/full socket debug server.lua: accepted new client connection from 127.0.0.1:42664 to 5000 mod_proxy65 debug SOCKS5 greeting complete mod_proxy65 debug SOCKS5 initiator connected for session e83c1d0c64441f3a22a5f74a27d4f7dd17a8c066 c2s1c0bac0 debug Received[c2s]: <iq id='H_45' type='set' to='proxy.necton3.int'> necton3.int:log_events debug necton3.int firing event: pre- iq/host proxy.necton3.int:proxy65 debug Transfer activated (sid: 5620a228-2256-4004-9149-6ca8593a461b, initiator: go...@necton3.int/SàT, target: lou...@necton3.int/Gajim) mod_proxy65 debug ondisconnect: 'receive buffer exceeded' mod_proxy65 debug ondisconnect: 'false' socket debug server.lua: closed client handler and removed socket from list socket debug server.lua: closed client handler and removed socket from list --- end logs I have added myself the "ondisconnect" log, because else mod_proxy65 was not logging the err. The xml stream is not disconnected, it's the Socks5 client only which is disconnected. So I currently workaround this by setting a 4Kio limit for proxies, which is a reasonable value anyway. Hope this help Cheers Goffi Le mercredi 11 novembre 2015, 22:51:23 Matthew Wild a écrit : > Hi, > > On 11 November 2015 at 21:19, Goffi <go...@goffi.org> wrote: > > G'day, > > > > I'm currently working on file transfer, and I realized that default > > minimum > > buffer size for proxy65 is 4096 octets. If a client send a bigger one, it > > will be disconnected. > > That's not intentional (obviously). Filling the buffer in mod_proxy65 > is harmless and not an error. > > I suspect you may be encountering an unrelated known issue. Are you > using libevent with Prosody? Does the client get disconnected, or does > the connection freeze? > > Try setting the following in your config file (global section) and see > if the issue goes away: > > network_default_read_size = "*a" > > If that doesn't fix it, please supply debug logs. > > > I haven't found documentation about a recommended buffer size, but 4Kio > > seems really low to me, especially if going above disconnect the client. > > 64 Kio seems more usual. In fact I have tried with Gajim, and it is > > disconnected when sending a file through the proxy. > > On my client I have set the size to 4Kio because of this, but I wonder if > > the subject has already been discussed here (after all, I guess I'm not > > the first one to send a file through prosody proxy with gajim). > > So if you have any hint on why this limit has been choosed, and if I need > > to report that to Gajim developers, i would appreciate. > > If Prosody is disconnecting the client here, it's most likely a bug on > our side, not Gajim. And you're certainly not the first person to send > a file through mod_proxy65, in the past I have stress-tested it, > streaming many GB through at a good speed. The buffer is a part of > that, and I think 4KB is fine for general use and public servers. It > seems it's not configurable however, and we should probably fix > that... > > Regards, > Matthew -- You received this message because you are subscribed to the Google Groups "prosody-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to prosody-dev+unsubscr...@googlegroups.com. To post to this group, send email to prosody-dev@googlegroups.com. Visit this group at http://groups.google.com/group/prosody-dev. For more options, visit https://groups.google.com/d/optout.