Managing and preventing system overload from WPS processes??
As WPS processes are both powerful and flexible, it is not difficult to conceive of using an existing process (or creating your own) to perform a task that could overwhelm the server. (For examples, a contour map with bands at every integer level, or unioning every single feature into one giant multigeometry.)
Limits can be put in place either on the service level or the process level to prevent this sort of thing from occurring.
Using the example of the contour map (using the process
ras:Contour, we can set the input that determines how closely spaced the band values can be. We would specifically want to set a minimum value for that input.
This page shows the various process groups. Click the Manage link next to the
rasgroup to see the processes in that group.
Processes can be restricted or disabled on these pages.
Scroll down to the
ras:Contourprocess. Click the Edit link in the Limits column.
This page shows all of the input parameters of the process, as well that those parameters’ types.
Descriptions of the parameters themselves can be found via a WPS Describe Process request, or more simply by navigating to the WPS Request Builder, and selecting the process.
In this case, we want to set the minimum on the
intervalparameter, which sets the repeating distance between each contour band. While the desired value here is data-specific (and unit-specific), even a local contour map of a hiking trail, it would be unlikely to want greater detail than 100 (meters or feet). Enter
100in the Min box next for the
Click Apply to close the process limits page.
Click Apply to close the process selection page.
To verify these settings have taken effect, open the WPS request builder and execute the process with a value outside the allowed range.
While every process is slightly different, it is possible to set a global limit for input data. This is to prevent the server from ingesting too large a file to be handled properly.
Navigate back to.
Scroll down to the box titled Maximum size for complex inputs and enter a value (in MB). This will ensure that any process that takes as input a geometry or layer, will not accept content larger than this value.
You may also wish to set a timeout value, so that processes don’t take too much time in execution. To do this:
Scroll down to the section titled Execution Settings and enter a timeout value in the box titled Connection Timeout. You can also more granularly set the maximum execution time for synchronous processes and asynchronous processes.
There are also options in this section for restricting the number of concurrent processes that can run on the server.