<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="127.0.0.1" />
<constructor-arg index="1" type="int" value="1935" /><!--创建多个red5服务,端口不能相同-->
</bean>
<!-- You can now add additional ports and ip addresses
<bean class="java.net.InetSocketAddress">
<constructor-arg index="0" type="java.lang.String" value="0.0.0.0" />
<constructor-arg index="1" type="int" value="1936" />
</bean>
-->
</list>
</property>
<property name="receiveBufferSize" value="65536" />
<property name="sendBufferSize" value="271360" />
<property name="connectionThreads" value="4" />
<property name="ioThreads" value="16" />
<!-- This is the interval at which the sessions are polled for stats. If mina monitoring is not
enabled, polling will not occur. -->
<property name="jmxPollInterval" value="1000" />
<property name="tcpNoDelay" value="true" />
</bean>
注意: tomcat里面添加太多的red5服务,会造成tomcat内存泄露,这么时候就要修改tomcat的启动内存bin/catalina.bat
Win:
set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx1024m
linux:
JAVA_OPTS="$JAVA_OPTS -Xms1024m -Xmx1024m -XX:PermSize=256M -XX:MaxNewSize=512m -XX:MaxPermSize=512m"
如果要修改webapps下的项目启动的优先级,就在 conf\Catalina\localhost 加上一个 项目名.xml 的文件
文件内容:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Context antiResourceLocking="false" privileged="true" />