English

Bug: The user limits are not set correctly when using the unit file provided within the software installation for systemd service startup in Linux operating systems

Description

The process limits (nproc) and file handles (nofile) for running a service for Portal for ArcGIS, ArcGIS Server, ArcGIS Data Store, and GeoEvent Server are not set properly when using the provided unit file for systemctl service startup in Linux operating systems.

This issue affects all 10.5.1 and prior versions that utilize the unit file provided with the software installation in conjunction with systemd to start Portal, Server, Data Store, or GeoEvent services. The process limits (nproc) and file handles (nofile) are not set correctly for the user running the service if systemd is used to start the service because the limits must be set explicitly within the unit file. 

Cause

When utilizing systemd, systemctl is used to start and enable the service. Systemctl does not check for any configuration within /etc/security/limits.conf, where process limits and file handles are traditionally set for user logins. Processes spawned by systemd do not run with any limits set in /etc/security/limits.conf. For this reason, the limits must be set explicitly within the unit file.

Additional information regarding systemd process startup is available at Red Hat Bugzilla – Bug 754285.

Workaround

For 10.5.1 and prior versions, edit the unit file to properly set the process limits and file handle limits. Examples of each are provided below.

Portal for ArcGIS: arcgisportal.service
[Unit]
Description=Portal for ArcGIS Service
After=network.target
 
[Service]
Type=forking
User=ags
GuessMainPID=false
LimitNOFILE=65535
ExecStart=/foo/bar/arcgis/portal/startportal.sh
ExecStop=/foo/bar/arcgis/portal/stopportal.sh
 
[Install]
WantedBy=multi-user.target

ArcGIS Server: arcgisserver.service
[Unit]
Description=ArcGIS Server Service
After=network.target
 
[Service]
Type=forking
User=ags
GuessMainPID=false
LimitNOFILE=65535
LimitNPROC=25059
ExecStart=/foo/bar/arcgis/server/startserver.sh
ExecStop=/foo/bar/arcgis/server/stopserver.sh
 
[Install]
WantedBy=multi-user.target

ArcGIS Data Store: arcgisdatastore.service
[Unit]
Description=ArcGIS Data Store Service
After=network.target
 
[Service]
Type=forking
User=ags
GuessMainPID=false
LimitNOFILE=65535
LimitNPROC=25059
ExecStart=/foo/bar/arcgis/datastore/startdatastore.sh
ExecStop=/foo/bar/arcgis/datastore/stopdatastore.sh
 
[Install]
WantedBy=multi-user.target

GeoEvent Server: geoevent.service
[Unit]
Description=ArcGIS Geoevent Server
After=network.target
 
[Service]
Type=forking
User=ags
GuessMainPID=false
LimitNOFILE=65535
LimitNPROC=25059
ExecStart=/foo/bar/arcgis/server/GeoEvent/bin/ArcGISGeoEvent-service start
ExecStop=/foo/bar/arcgis/server/Geoevent/bin.ArcGISGeoEvent-service stop
 
[Install]
WantedBy=multi-user.target

Future releases of ArcGIS Enterprise contain an updated unit file for the systemd service startup to include process limits and file handles, as needed. The defects linked in the Related Information section below have been logged accordingly.

Related Information

  • BUG-000105124 - The arcgisserver.service file provided for using systemctl to start Data Store processes does not correctly set the nproc and nofile limits.
  • BUG-000107678 - The arcgisdatastore.service file provided for using systemctl to start Data Store processes does not correctly set the nproc and nofile limits.
  • BUG-000107679 - The arcgisportal.service file provided for using systemctl to start Portal processes does not correctly set the nofile limits.
  • BUG-000107680 - The geoevent.service file provided for using systemctl to start Data Store processes does not correctly set the nproc and nofile limits.