Skip to end of metadata
Go to start of metadata

Applies to:

All versions of Cryptshare Server

Symptom:

 The Cryptshare Server responds slowly when it is used by a large amount of users at a time.


Cause:

The Cryptshare Server tries to respond to all requests but cannot answer the requests faster than they arrive.


Solution:

Solution 1: Increase the Amount of Available Resources

The slowdown can be caused by the Cryptshare Server not having access to enough resources to process all requests. Increasing the available RAM or using a faster CPU can solve this.

Solution 2: Adjust the Web Server Configuration

The configuration file "resources/WEB-INF/ui-config.xml" in the Cryptshare Server installation directory can be used to adjust how the web server behaves, the following section includes comments to highlight the options that can be adjusted to improve performance under high load. You can find the full documentation for the configuration file in the Jetty Wiki.

ui-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "resources/WEB-INF/configure.dtd">
<Configure id="Cryptshare" class="org.eclipse.jetty.server.Server">
    <Arg name="threadpool">
        <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
            <Arg name="minThreads" type="int">5</Arg> 
            <Arg name="maxThreads" type="int">25</Arg> <!-- OPTION: If a lower value is set, the maximum amount of requests the web server will process is reduced. This will cause the server to handle fewer request but be more responsive. -->
            <Arg name="idleTimeout" type="int">1000</Arg>
            <Arg name="queue">
                <New class="java.util.concurrent.ArrayBlockingQueue">
                    <Arg type="int">200</Arg> <!-- OPTION: If a lower value is set, the server will accept less requests while all threads are used. This will cause the server to handle fewer request but be more responsive. -->
                </New>
            </Arg>
        </New>
    </Arg>
   <!-- [...] -->
   <Call name="addConnector">
      <Arg>
         <New class="org.eclipse.jetty.server.ServerConnector">
            <!-- [...] -->
            <Set name="idleTimeout">
               <Property name="http.timeout" default="15000"/> <!-- OPTION: If a lower value is set, the server will terminate unresponsive connections faster. This will cause the server to drop inactive requests faster and reduce the total server load. -->
            </Set>
            <!-- [...] -->
         </New>
      </Arg>
   </Call>
   <Call id="sslConnector" name="addConnector">
      <Arg>
         <New class="org.eclipse.jetty.server.ServerConnector">
            <!-- [...] -->
            <Set name="idleTimeout">
               <Property name="http.timeout" default="15000"/> <!-- OPTION: If a lower value is set, the server will terminate unresponsive connections faster. This will cause the server to drop inactive requests faster and reduce the total server load. -->
            </Set>
            <!-- [...] -->
         </New>
      </Arg>
   </Call>
</Configure>


Additionally, other settings of the Cryptshare Server can be adjusted to improve responsiveness as described here: Advanced Cryptshare Configuration