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

Last Published: April 25, 2020

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.

Article ID:000016919

Software:
  • ArcGIS Data Store
  • Portal for ArcGIS
  • ArcGIS Server

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic