There is a setting that can be used to resolve this. There is a desire to let ArcGIS Server scale up the number of ArcSOC instances to whatever the hardware will support. However, when ArcSOCs have a dependency on X Windows libraries then they can scale only to about 240 ArcSOCs running on a machine. Usually map service SOCs have no dependency on X Windows and we disable the loading of X-Windows on map service SOCs and this lets ArcGIS Server scale to the hardware limit (usually whatever the RAM will support).
In some cases, SOEs may use functonality that require X Windows and this is one of those cases. There is a setting precisely for this case however called FORCE_X_DISPLAY.
You can set this by editing the init_user_params.sh file in the .../arcgis/server/usr directory and putting the line
export FORCE_X_DISPLAY=1
Then re-start ArcGIS Server and this issue should disappear.