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.
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
Using Configuration Flags on the Command Line
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.
Command Line Configuration Flags for OmniSci Server
Command Line Configuration Flags for OmniSci Web Server
Flag | Description | Default | Why Change It? |
---|---|---|---|
-b | backend-url string |
URL to http-port on mapd_server | http://localhost:9090 |
Change to avoid collisions with other services. |
--cert string |
Certificate file for HTTPS | cert.pem |
Change for testing and debugging. |
-c | --config string |
Path to OmniSci configuration file | Change for testing and debugging. | |
-d | --data string |
Path to OmniSci data directory | data |
Change for testing and debugging. |
--docs string |
Path to documentation directory | docs |
|
--enable-https |
Enable HTTPS support | Change to enable secure HTTP. | |
-f | --frontend string |
Path to frontend directory | frontend |
|
--key string |
Key file for HTTPS | key.pem |
Change for testing and debugging. |
-p | --port int |
Frontend server port | 9092 |
Change to avoid collisions with other services. |
-r | --read-only |
Enable read-only mode | Prevent inadvertent (or nefarious) changes to the data. | |
--servers-json string |
Path to servers.json | Change for testing and debugging. | |
--timeout duration |
Maximum request duration in #h#m#s format. For example 0h30m0s represents a duration of 30 minutes. |
1h0m0s |
The --timeout option controls the maximum duration of individual HTTP requests. This is used to manage resource exhaustion caused by improperly closed connections. One side effect is that it limits the execution time of queries made over the Thrift HTTP transport. This timeout duration must be increased if queries are expected to take longer than the default duration of one hour; for example, if you perform a COPY FROM on a large file when using mapdql with the HTTP transport. |
--tmpdir string |
Path for temporary file storage | /tmp |
The temporary directory is used as a staging location for file uploads. You might want to place this directory on the same file system as the OmniSci data directory. If not specified on the command line, mapd_web_server also respects the standard TMPDIR environment variable as well as a specific MAPD_TMPDIR environment variable, the latter of which takes precedence. If you use neither the command-line argument nor one of the environment variables, the default, /tmp/ is used. |
-v | --verbose |
Print all log messages to stdout | Change for testing and debugging. | |
--version |
Return version | ||
--db-query-list <path-to-query-list-file> |
Pre-load data to memory based on SQL queries stored in a list file. | n/a | Automatically run queries that load the most frequently used data to enhance performance. See Pre-loading Data. |