长时间握手处理
来源:互联网 发布:剑三脸型数据导出在哪 编辑:程序博客网 时间:2024/05/01 09:33
频繁输出
2011-02-24 17:33:40,509 [Red5_Scheduler_Worker-4] WARN o.r.server.net.rtmp.RTMPConnection - Closing RTMPMinaConnection from 90.196.167.107 : 49699 to 50.28.4.173 (in: 3455 out 3271 ), with id 5 due to long handshake
信息,需要把red5-code.xml的 maxHandshakeTimeout 的值修改高一点,系统默认是5000
原因:
1. 网络不稳定,造成延迟过大
2. 程序处理时间太长,造成服务器与客户端的连接延迟过大, 比如程序中远程同步处理(rmi),造成程序短暂性的卡死
如果出现:
[Red5_Scheduler_Worker-3] WARN o.r.server.net.rtmp.RTMPConnection - This often happens if YOUR Red5 application generated an exception on start-up. Check earlier in the log for that exception first!
说明某一步操作已经暂停至60秒以上了,rtmp.max_inactivity=60000 是连接线程最大暂停时间。rtmp.connect_threads=4是连接线程的个数,red5用的连接池来管理,如果这个4个连接线程都暂停了,说明red5已经卡死了,或者有死锁的情况.
red5.properties的rmtp配置说明
rtmp.host=0.0.0.0连接的IP
rtmp.port=1935 连接端口
rtmp.port=1935 连接端口
这里IP与端口可以配置多项
red5-core.xml中
<!-- RTMP Mina Transport --><bean id="rtmpTransport" class="org.red5.server.net.rtmp.RTMPMinaTransport" init-method="start" destroy-method="stop"><property name="ioHandler" ref="rtmpMinaIoHandler" /> <property name="connectors"> <list> <bean class="java.net.InetSocketAddress"> <constructor-arg index="0" type="java.lang.String" value="${rtmp.host}" /> <constructor-arg index="1" type="int" value="${rtmp.port}" /> </bean> <!-- 这里可以配置多个IP和端口 <bean class="java.net.InetSocketAddress"> <constructor-arg index="0" type="java.lang.String" value="${rtmp.host}" /> <constructor-arg index="1" type="int" value="1936" /> </bean> --> </list> </property><property name="receiveBufferSize" value="${rtmp.receive_buffer_size}" /><property name="sendBufferSize" value="${rtmp.send_buffer_size}" /><property name="connectionThreads" value="${rtmp.connect_threads}" /><property name="ioThreads" value="${rtmp.io_threads}" /><!-- This is the interval at which the sessions are polled for stats. If mina monitoring is notenabled, polling will not occur. --><property name="jmxPollInterval" value="1000" /><property name="tcpNoDelay" value="${rtmp.tcp_nodelay}" /></bean>
rtmp.io_threads=16 IO线程数
rtmp.connect_threads=4 连接线程数
rtmp.send_buffer_size=271360 发送最大字节数
rtmp.receive_buffer_size=65536 接受最大字节数
rtmp.ping_interval=1000 ping的毫秒数,每1000毫秒ping1次
rtmp.max_inactivity=60000 最大暂停时间
设置为非延迟发送,为true则不组装成大包发送,收到东西马上发出
rtmp.tcp_nodelay=true mina的一个参数设置
rtmp.tcp_nodelay=true mina的一个参数设置
- 长时间握手处理
- Handler处理长时间事件
- ORACLE 处理长时间锁表
- 页面长时间不操作处理
- red5长时间握手导致连接失败的几个可能性原因
- PHP 批处理 处理大数据 长时间处理
- Swing多线程处理长时间运行的事件
- Android 系列 6.15处理长时间点击事件
- Flex用户长时间不操作要求重新登录的处理
- ArcGIS 注册版本长时间无响应处理案例
- 握手
- 对一个DROP MV 语句长时间无返回的处理步骤。
- flex(替代session过期)用户长时间不操作要求重新登录的处理
- flex(替代session过期)用户长时间不操作要求重新登录的处理
- 如何在ADF中处理需要长时间运行的SQL QUERY。
- Activity、BroadcastReceiver、Service,只要是有长时间处理的任务,就需要重新开一个线程?!
- WPF中UI及时更新,如何在处理长时间工作时,保持界面的持续更新
- WPF中UI及时更新,如何在处理长时间工作时,保持界面的持续更新
- red5 disconnect方法
- MyEclipse10.0 采用插件方式安装 SVN
- MyEclipse10.0 SVN
- limux 解压命令-tar
- 提高red5性能几个配置。
- 长时间握手处理
- Flex DataGrid中获得外部对象 outerDocument
- DataGrid 的用法
- php常用类
- red5 cluster 集群
- Red5 性能测试
- 断开red5连接时报错
- CListBox::ItemFromPoint
- java设计模式---迭代器模式