wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

max length of websocket #149

Closed liguanquan closed 9 years ago

liguanquan commented 10 years ago

hi wandenberg thanks your great work save me from openfire cluster my issue :i use server side websocket when message length > 3k connection close and message send fail nginx error.log give me client closed prematurely connection (11: Resource temporarily unavailable

client side websocket is fail too but longpoll is ok i update nginx and nginx-push-stream-module

sysctl.conf : 3 net.core.rmem_max = 8738000 4 net.core.wmem_max = 6553600 5 6 # increase Linux autotuning TCP buffer limits 7 # min, default, and max number of bytes to use 8 # set max to at least 4MB, or higher if you use very high BDP paths 9 10 net.ipv4.tcp_rmem = 819200 873800 8738000 11 net.ipv4.tcp_wmem = 819200 875360 6553600 12 14 net.ipv4.tcp_mem = 853440 1137920 1706880 15 16 net.core.rmem_default = 5000000 17 net.core.wmem_default = 5000000

give me some advice thanks

liguanquan commented 10 years ago

@wandenberg need your advice urgently

wandenberg commented 10 years ago

Hi @liguanquan sorry for the delay. I'm working to reproduce the problem. For now you can try to send small messages or use a common POST to publish the message.

liguanquan commented 10 years ago

ok i'll try split and join auto in program. thank you for this module again!!!

wandenberg commented 10 years ago

Hi @liguanquan

keep tracking the branch deal_with_ngx_again. The specific problem of publish a big message using WebSocket was solved. But as the message is sent to the publisher too, when using websocket, it keep being disconnected. I have to solve the problem on delivering big messages now.

liguanquan commented 10 years ago

greate it works !!! we'll do some loadtest.

wandenberg commented 9 years ago

Hi @liguanquan

how were your loadtests ?

liguanquan commented 9 years ago

its work fine in my production environment

wandenberg commented 9 years ago

Hi @liguanquan

can you repeat your tests with the code on fix_ngx_again_on_read_and_write branch (commit df6b37ae056b3a7bc97708e2380a0e6b7fdc5510). This version is equals the last one just updated with the code on master and with a fix for ngx_again when it happens on the write function.

wandenberg commented 9 years ago

Fixed with 312f330a01f92f7090a17d588209f970b25e86a4