uCosminexus Application Server, Web Container Functionality Guide
To control the number of concurrent connections from the Web client, you must set a J2EE server.
The setting method and example of controlling the number of concurrent connections from the Web client are described here.
Specify the definition for controlling the number of concurrent connections from the Web client in the following parameter in the <configuration> tag of the logical J2EE server (j2ee-server), in the Easy Setup definition file:
For details on the Easy Setup definition file and the parameters to be specified, see the uCosminexus Application Server Definition Reference Guide.
The example of settings for controlling the number of concurrent connections from the Web client is described here.
The following is an example of settings wherein the upper limit of number of request processing threads is 40 and the number of request processing threads for which the connection is rejected is 1:
... <param> <param-name>webserver.connector.inprocess_http.max_connections</param-name> <param-value>40</param-value> </param> <param> <param-name>webserver.connector.inprocess_http.rejection_threads</param-name> <param-value>1</param-value> </param> ... |
In this example, the number of Web clients that can process requests concurrently after connection is 39. If the number of threads that are processing requests reaches 39, the remaining 1 thread keeps returning error to the Web client.
By controlling the number of concurrent connections from the Web client, an error of the status code 503 (Service Unavailable) is returned to the Web client for the requests for which connection is rejected. At this time if you customize the error page returned to the client, you can customize the response message or redirect to another server. The following are the setting examples for each of these cases. For details on customizing the error page, see 5.15 Error page customization (In-process HTTP server) .
... <param> <param-name>webserver.connector.inprocess_http.rejection_threads</param-name> <param-value>3</param-value> </param> <param> <param-name>webserver.connector.inprocess_http.error_custom.list</param-name> <param-value>REJECTION_1</param-value> </param> <param> <param-name>webserver.connector.inprocess_http.error_custom.REJECTION_1.status</param-name> <param-value>503</param-value> </param> <param> <param-name>webserver.connector.inprocess_http.error_custom.REJECTION_1.file</param-name> <param-value>C: /data/busy.html</param-value> </param> <param> <param-name>webserver.connector.inprocess_http.error_custom.REJECTION_1.file.content_type=text/html; charset</param-name> <param-value>ISO-8859-1</param-value> </param> <param> <param-name>webserver.connector.inprocess_http.error_custom.REJECTION_1.request_url</param-name> <param-value>/*</param-value> </param> ... |
... <param> <param-name>webserver.connector.inprocess_http.rejection_threads</param-name> <param-value>3</param-value> </param> <param> <param-name>webserver.connector.inprocess_http.error_custom.list</param-name> <param-value>REJECTION_1</param-value> </param> <param> <param-name>webserver.connector.inprocess_http.error_custom.REJECTION_1.status</param-name> <param-value>503</param-value> </param> <param> <param-name>webserver.connector.inprocess_http.error_custom.REJECTION_1.redirect_url</param-name> <param-value>http: //host1/busy.html</param-value> </param> <param> <param-name>webserver.connector.inprocess_http.error_custom.REJECTION_1.request_url</param-name> <param-value>/*</param-value> </param> <param> ... |
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.