This commit is contained in:
zzz
2017-03-11 18:23:14 +00:00
parent 758c0865dc
commit 22cf9e06ff
5 changed files with 38 additions and 79 deletions

View File

@ -1,6 +1,7 @@
0.15.0
2015-08-xx
2017-03-11
Increase default limits, set I2CP tag options
Update eepsite configuration for Jetty 9 (I2P 0.9.30)
0.14.0
2015-05-28

View File

@ -15,10 +15,10 @@
<!-- * threads: Raise maximumPoolSize in the ThreadPool section -->
<!-- if you have a high-traffic site and get a lot of warnings. -->
<!-- -->
<!-- I2P uses Jetty 7. If you need web server features not found -->
<!-- in Jetty 7, you may install and run Jetty 7 or 8 in a different JVM -->
<!-- I2P uses Jetty 9. If you need web server features not found -->
<!-- in I2P's Jetty 9, you may install and run Jetty 9 in a different JVM -->
<!-- or run any other web server such as Apache. If you do run another web -->
<!-- server instead, be sure and disable the Jetty 6 server for your -->
<!-- server instead, be sure and disable the Jetty 9 server for your -->
<!-- eepsite on http://127.0.0.1:7657/configclients.jsp . -->
<!-- -->
<!-- Jetty now uses the I2P logging system rather than wrapper.log. -->
@ -42,18 +42,18 @@
<!-- =========================================================== -->
<!-- Server Thread Pool -->
<!-- =========================================================== -->
<Set name="ThreadPool">
<!-- PICK ONE -->
<Arg>
<!--
Recommended.
Requests above the maxThreads + queue_size will be rejected and logged.
ref:
https://wiki.eclipse.org/Jetty/Howto/High_Load
http://trac.i2p2.i2p/ticket/1395
-->
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
<Arg type="int">20</Arg> <!-- maxThreads, overridden below -->
<Arg type="int">3</Arg> <!-- minThreads, overridden below -->
<Arg type="int">60000</Arg> <!-- maxIdleTimeMs, overridden below -->
<Arg>
<New class="java.util.concurrent.LinkedBlockingQueue">
<Arg type="int">50</Arg>
@ -61,43 +61,11 @@
</Arg>
<Set name="minThreads">4</Set>
<Set name="maxThreads">20</Set>
<Set name="maxIdleTimeMs">60000</Set>
<Set name="idleTimeout">60000</Set>
<Set name="daemon">true</Set>
<Set name="name">Zzzot Jetty</Set>
</New>
<!-- Optional Java 5 bounded threadpool with job queue
Requests above the max will be rejected and logged.
High-traffic sites should increase maximumPoolSize.
Args are:
corePoolSize (should be at least 3)
maximumPoolSize
keepAliveTime (milliseconds)
timeout (TimeUnit)
queue (BlockingQueue)
Not recommended.
ref:
http://trac.i2p2.i2p/ticket/1395
http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html
-->
<!--
<New class="org.eclipse.jetty.util.thread.ExecutorThreadPool">
<Arg type="int">3</Arg>
<Arg type="int">20</Arg>
<Arg type="long">60000</Arg>
<Arg>
<Call class="java.util.concurrent.TimeUnit" name="valueOf" >
<Arg>MILLISECONDS</Arg>
</Call>
</Arg>
<Arg>
<New class="java.util.concurrent.SynchronousQueue" />
</Arg>
</New>
-->
</Set>
</Arg>
@ -116,38 +84,31 @@
-->
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<New class="org.eclipse.jetty.server.ServerConnector">
<Arg><Ref id="Server" /></Arg>
<Arg type="int">1</Arg> <!-- number of acceptors -->
<Arg type="int">0</Arg> <!-- default number of selectors -->
<Arg>
<Array type="org.eclipse.jetty.server.ConnectionFactory"> <!-- varargs so we need an array -->
<Item>
<New class="org.eclipse.jetty.server.HttpConnectionFactory">
<Arg>
<New class="org.eclipse.jetty.server.HttpConfiguration">
<Set name="sendServerVersion">false</Set>
<Set name="sendDateHeader">true</Set>
</New>
</Arg>
</New>
</Item>
</Array>
</Arg>
<Set name="host">127.0.0.1</Set>
<Set name="port">7662</Set>
<Set name="maxIdleTime">60000</Set>
<Set name="Acceptors">1</Set>
<Set name="statsOn">false</Set>
<Set name="confidentialPort">8443</Set>
<Set name="lowResourcesConnections">5000</Set>
<Set name="lowResourcesMaxIdleTime">5000</Set>
<Set name="useDirectBuffers">false</Set>
<Set name="idleTimeout">600000</Set>
</New>
</Arg>
</Call>
<!-- Recommended to use this connector on Java 5, as
Jetty 6 and Java 5 NIO don't play well together.
-->
<!--
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.bio.SocketConnector">
<Set name="host">127.0.0.1</Set>
<Set name="port">7662</Set>
<Set name="maxIdleTime">60000</Set>
<Set name="Acceptors">1</Set>
<Set name="statsOn">false</Set>
<Set name="confidentialPort">8443</Set>
</New>
</Arg>
</Call>
-->
<!-- =========================================================== -->
<!-- Set up global session ID manager -->
<!-- =========================================================== -->
@ -301,7 +262,7 @@
<Ref id="DeploymentManager">
<Call name="addAppProvider">
<Arg>
<New class="org.eclipse.jetty.deploy.providers.ContextProvider">
<New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
<Set name="monitoredDirName">$PLUGIN/contexts</Set>
<Set name="scanInterval">120</Set>
</New>
@ -381,8 +342,6 @@
<!-- extra options -->
<!-- =========================================================== -->
<Set name="stopAtShutdown">true</Set>
<Set name="sendServerVersion">false</Set>
<Set name="sendDateHeader">true</Set>
<Set name="gracefulShutdown">1000</Set>
<Set name="stopTimeout">1000</Set>
</Configure>

View File

@ -8,6 +8,5 @@ updateURL=http://stats.i2p/i2p/plugins/zzzot-update.xpi2p
updateURL.su3=http://stats.i2p/i2p/plugins/zzzot-update.su3
websiteURL=http://zzz.i2p/forums/16
license=Apache 2.0
min-jetty-version=7
max-jetty-version=8.9999
min-i2p-version=0.9.9
min-jetty-version=9
min-i2p-version=0.9.29

View File

@ -25,7 +25,7 @@
</target>
<property name="javac.compilerargs" value="" />
<property name="javac.version" value="1.6" />
<property name="javac.version" value="1.7" />
<target name="compile">
<mkdir dir="./build" />

View File

@ -70,7 +70,7 @@ public class ZzzOTController implements ClientApp {
private static final String NAME = "ZzzOT";
private static final String CONFIG_FILE = "zzzot.config";
private static final String BACKUP_SUFFIX = ".jetty6";
private static final String BACKUP_SUFFIX = ".jetty8";
private static final String[] xmlFiles = {
"jetty.xml", "contexts/base-context.xml", "contexts/cgi-context.xml",
"etc/realm.properties", "etc/webdefault.xml" };
@ -280,10 +280,10 @@ public class ZzzOTController implements ClientApp {
* @since 0.10 (Jetty 7)
*/
private static boolean shouldMigrate(File f) {
String xml = FileUtil.readTextFile(f.getAbsolutePath(), 100, true);
String xml = FileUtil.readTextFile(f.getAbsolutePath(), 400, true);
if (xml == null)
return true;
return xml.contains("class=\"org.mortbay.jetty.Server\"");
return xml.contains("class=\"org.eclipse.jetty.server.nio.SelectChannelConnector\"");
}
/**