Using OmniSci Services

OmniSci features two system services: mapd_server and mapd_web_server. You can start these services individually using systemd.

Starting and Stopping OmniSci Core Using systemd

For permanent installations of OmniSci Core, OmniSci recommends that you use systemd to manage the OmniSci Core services. systemd automatically handles tasks such as log management, starting the services on restart, and restarting the services if there is a problem.

In addition, systemd manages the open-file limit in Linux. Some cloud providers and distributions set this limit too low, which can result in errors as your OmniSci environment and usage grow. For more information about adjusting the limits on open files, see Why am I seeing the error "Too many open files...erno24"? in Frequently Asked Questions.

Initial Setup

You use the install_mapd_systemd.sh script to prepare systemd to run OmniSci services. The script asks questions about your environment, then installs the systemd service files in the correct location. You must run the script as the root user so that the script can perform tasks such as creating directories and changing ownership.

cd $MAPD_PATH/systemd
sudo ./install_mapd_systemd.sh

The install_mapd_systemd.sh script asks for the information described in the following table.

Variable Use Default Notes
MAPD_PATH Path to the OmniSci Core installation directory Current install directory OmniSci recommends /opt/mapd as the install directory.
MAPD_STORAGE Path to the storage directory for OmniSci Core data and configuration files /var/lib/mapd Must be dedicated to OmniSci. The installation script creates the directory $MAPD_STORAGE/data, generates an appropriate configuration file, and saves the file as $MAPD_STORAGE/mapd.conf.
MAPD_USER User OmniSci Core is run as Current user User must exist before you run the script.
MAPD_GROUP Group OmniSci Core is run as Current user's primary group Group must exist before you run the script.

Starting OmniSci Core Using systemd

To manually start OmniSci Core using systemd, run:

sudo systemctl start mapd_server
sudo systemctl start mapd_web_server

Restarting OmniSci Core Using systemd

You can use systemd to restart OmniSci Core—for example, after making configuration changes:

sudo systemctl restart mapd_server
sudo systemctl restart mapd_web_server

Stopping OmniSci Core Using systemd

To manually stop OmniSci Core using systemd, run:

sudo systemctl stop mapd_server
sudo systemctl stop mapd_web_server

Enabling OmniSci Core on Startup

To enable the OmniSci Core services to start on restart, run:

sudo systemctl enable mapd_server
sudo systemctl enable mapd_web_server

Using Configuration Parameters

To use options provided in a configuration file, set the --config flag to the path of the configuration file for mapd_server and mapd_web_server. For example:

$MAPD_PATH/bin/mapd_server --config $MAPD_STORAGE/mapd.conf

You can also specify configuration settings at the command line. OmniSci recommends that you use the systemctl command to start and stop the servers, but you can use the mapd_server and mapd_web_server commands with configuration flags for testing and debugging. See Configuration Parameters for the full list of options.