apache > db
Apache DB Project
 
Font size:      

Configuring the network server

Configuring the network server

The network server can be configured to use a specific number of threads to handle connections.

The minimum number of threads is the number of threads that are started when the network server is booted. This is specified as a property, derby.drda.minThreads = <min>.

The maximum number of threads is the maximum number of threads that will be used for connections. If more connections are active than are threads available, connections must wait until the next thread becomes available. Threads can become available after a specified time. The time is checked only when the thread has finished processing a communication.

You can change the maximum number of threads by using the following command:

java org.apache.derby.drda.NetworkServerControl maxthreads <max> [-h <host>] 
[-p <portnumber>] 

You can also set the derby.drda.maxThreads property to assign this value.

A <max> value of 0 means that there is no maximum and a new thread will be generated for a connection if there are no current threads available. This is the default.

<max> and <min> are stored as integers so the theoretical maximum is 2147483647 (maximum integer). The practical maximum is determined by the machine configuration.

To change the time that a connection thread should work on one session's request to see whether there are waiting sessions, use the following command:

java org.apache.derby.drda.NetworkServerControl timeslice <milliseconds> [-h <host>] 
[-p <portnumber>] 

You can also set the derby.drda.timeSlice property to set this value.

A value of 0 milliseconds indicates that the thread will not give up working on the session until the session ends.

A value of -1 milliseconds indicates to use the default. The default value is 0.

The maximum number of milliseconds that can be specified is 2147483647 (maximum integer).

The Network Server configuration can also be changed using the servlet interface.


Previous Page
Next Page
Table of Contents
Index