JVM Settings
When VirtServer runs, it provides several parameters to the Java Virtual Machine (JVM) to set up the environment. You can modify these parameters according to your needs.
The VirtServer installer creates a *.vmoptions file that contains default JVM arguments. Here is a sample snippet of that file:
-include-options [path to other .vmoption file] -Xms128m -Xmx7880m -Dsoapui.properties=soapui.properties -Dsoapui.home=C:\Program Files\SmartBear\VirtServer-3.34.0/bin...
To modify these settings, open the *.vmoptions file with a text editor. You can change existing parameters or add new ones. Administrative privileges are required to edit this file.
Custom JVM Options
Add a file named userdefinedvmoptions to the .readyapi/virtserver directory to specify custom JVM options. This file lets you add JVM parameters that persist through VirtServer updates and upgrades to newer versions, ensuring your custom settings remain intact.
Java Virtual Machine Parameters
This section describes variables that VirtServer passes to the JVM to prepare the environment.
-Xms<value>
Specifies the initial heap (memory) size in bytes.
Append k or K to specify the value in kilobytes, and k or K to specify the value in megabytes.
Example:
-Xms128m
-Xmx<value>
Specifies the maximum heap (memory) size in bytes. Default value: 7880m.
Append k or K to specify the value in kilobytes, and k or K to specify the value in megabytes.
Example:
-Xmx7880m
-Dsoapui.virt.optimizeForPerformance=<value>
In ReadyAPI 3.40.1, a synchronization update was added to ReadyAPI to improve accuracy when handling bulk requests. However, this update may affect the ReadyAPI performance speed for some customers who use Virtual Services as part of performance testing
As a solution, a flag lets you configure this setting. You can now prioritize processing speed over accuracy according to your requirements.
Control this flag by modifying the VMOptions file in /readyapi_install_dir/bin/virtserver.vmoptions. The default value is false if the flag is not present in the VMOptions file.
To enable this feature, add the following line to the virtserver.vmoptions file:
-Dsoapui.virt.optimizeForPerformance=true
-Dcli.http.timeout=<value>
Configures the timeout for VirtServer CLI.
When you deploy large project files (over 400 MB) by using the CLI, you may encounter a java.net.SocketTimeoutException error message. Timeouts are configurable through the addition of a VMOption.
Example:
-Dcli.http.timeout=60000
A successful response reads:
[INFO] Virt <virtual service name> successfully replaced on server with deployment id 1.
Conditional Match JVM Options
Set a Default Response per Signature
You can set a default response for each signature. VirtServer sends this response when an incoming request matches the signature but lacks a corresponding specific response. If the request doesn’t match any signature, the global default response is used.
To enable this feature in ReadyAPI, go to Preferences → Virtual Service and select the Enable default response per signature option. Once enabled, you can choose a default response for each signature, which VirtServer uses if the request matches the signature but doesn’t have an associated response.
To configure the corresponding support in VirtServer, add:
-DdefaultResponsePerSignatureEnabled=true.
Setting Dates Delta Using Property Expansion
The Dates Delta feature lets you to use property expansion for date values in Conditional Match. In ReadyAPI, set the date format as dd-MM-yyyy in Preferences → Virtual Service . This ensures that responses can have date values relative to request dates.
When Enable conditional match dates property expansion is set to true, the new syntax is automatically applied during record from traffic.
To configure the corresponding support in VirtServer, add: -DmagicDatesFormat=yyyy/MM/dd (or other format, per your preference).
Thread management JVM options
The following VMOptions configure thread suspension and queuing in VirtServer. For the corresponding max threads configuration in ReadyAPI, see Behavior Settings. SmartBear recommends setting max threads to twice the number of processors on the host machine.
VMOption name | Default | Descritpion |
|---|---|---|
| 5 | Specifies the number of seconds a request waits for a free thread before VirtServer responds with a |
| 10 | Specifies the multiplier applied to the configured |
The following example shows how suspendMultiplier works.
Assume maxThreads is configured to 20 for a virtual service deployed to VirtServer, and suspendMultiplier is configured to 3.
VirtServer processes up to 20 request threads in parallel and suspends up to 60 (20 × 3) requests waiting for an available thread.
If all 20 threads are busy processing and 60 suspended requests already exist, VirtServer immediately returns a
503response for the 81st (20 + 60 + 1) request.
Note
The Congestion behavior setting is no longer functional. Use soapui.virt.request.suspendMultiplier to control the maximum request queue size instead. For details, see Thread management JVM options.
OpenTelemetryTM observability
VirtServer 3.34.0 lets you monitor virtual service performance in real time using OpenTelemetryTM (OTel). You can send metrics directly to your existing observability stack, including Prometheus and Grafana, with less than 2% overhead at p99.
Available metrics include per-virt transaction, response, and error counts, JVM heap and GC data, and Jetty thread pool utilization. OTel support is opt-in, enabled through a YAML configuration file, and works with Docker deployments. For setup and configuration, see Configure Observability.
VM Option Configuration for Route to Live
Additional Configuration Required for Route to Live:
When you use Route to Live for Virtual Services deployed to VirtServer, ensure the appropriate vmoptions are configured in the following scenarios:
To allow restricted headers.
If the backend server uses a self-signed certificate.
If a proxy is enabled.
Configuration for Linux
To allow restricted headers, add the following option:
-Djdk.httpclient.allowRestrictedHeaders=connection,content-length,expect,host,upgrade
When starting as an application, add the required VM option to the virtserver.sh file.
When starting as a service, add the required VM option to the virtserver.vmoptions file.
If the backend server uses a self-signed certificate, add the following option:
-Djdk.internal.httpclient.disableHostnameVerification=true
When starting as an application, add the required VM option to the virtserver.sh file.
When starting as a service, add the required VM option to the virtserver.vmoptions file.
If a proxy is enabled, add the following option:
-Djdk.http.auth.tunneling.disabledSchemes=""
When starting as an application, add the required VM option to the virtserver.sh file.
When starting as a service, add the required VM option to the virtserver.vmoptions file.
Configuration for Windows
When starting as an application, add the required VM option to the
virtserver.shfile.When starting as a service, add the required VM option to the
virtserver.vmoptionsfile.