diff --git a/jooby/src/main/java/io/jooby/ServerOptions.java b/jooby/src/main/java/io/jooby/ServerOptions.java
index f9a547f5c8..cf3c5e4400 100644
--- a/jooby/src/main/java/io/jooby/ServerOptions.java
+++ b/jooby/src/main/java/io/jooby/ServerOptions.java
@@ -56,7 +56,7 @@ public class ServerOptions {
* Default application secures port 8443 or the value of system property
* server.securePort.
*/
- public static final int SEVER_SECURE_PORT =
+ public static final int SERVER_SECURE_PORT =
Integer.parseInt(System.getProperty("server.securePort", "8443"));
/** Default compression level for gzip. */
@@ -80,19 +80,20 @@ public class ServerOptions {
public static final int IO_THREADS =
Integer.parseInt(
System.getProperty(
- "__server_.ioThreads", Integer.toString(Runtime.getRuntime().availableProcessors())));
+ "__server_.ioThreads",
+ Integer.toString(Runtime.getRuntime().availableProcessors() * 2)));
private static final String SERVER_NAME = System.getProperty("__server_.name");
/**
- * Number of worker (a.k.a application) threads. It is the number of processors multiply by
+ * Number of worker (a.k.a application) threads. It is the number of ioThreads multiply by
* 8.
*/
public static final int WORKER_THREADS =
Integer.parseInt(
System.getProperty(
"__server_.workerThreads",
- Integer.toString(Runtime.getRuntime().availableProcessors() * 8)));
+ Integer.toString(IO_THREADS * 8)));
/** HTTP port. Default is 8080 or 0 for random port. */
private int port = SERVER_PORT;
@@ -564,7 +565,7 @@ public ServerOptions setExpectContinue(@Nullable Boolean expectContinue) {
*/
public @Nullable SSLContext getSSLContext(@NonNull ClassLoader loader) {
if (isSSLEnabled()) {
- setSecurePort(Optional.ofNullable(securePort).orElse(SEVER_SECURE_PORT));
+ setSecurePort(Optional.ofNullable(securePort).orElse(SERVER_SECURE_PORT));
SslOptions options = Optional.ofNullable(ssl).orElseGet(SslOptions::selfSigned);
setSsl(options);