HEAVY.AI features two system services: heavydb
and heavy_web_server
. You can start these services individually using systemd
.
systemd
For permanent installations of HeavyDB, HEAVY.AI recommends that you use systemd
to manage HeavyDB 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 HEAVY.AI 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 the Troubleshooting and Monitoring Solutions section of our knowledgebase.
You use the install_heavy_systemd.sh
script to prepare systemd
to run HEAVY.AI 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.
The install_heavy_systemd.sh
script asks for the information described in the following table.
systemd
To manually start HeavyDB using systemd
, run:
systemd
You can use systemd
to restart HeavyDB — for example, after making configuration changes:
systemd
To manually stop HeavyDB using systemd
, run:
To enable the HeavyDB services to start on restart, run:
You can customize the behavior of your HEAVY.AI servers by modifying your heavy.conf configuration file. See Configuration Parameters.
Variable
Use
Default
Notes
HEAVYAI_PATH
Path to HeavyDB installation directory
Current install directory
HEAVY.AI recommends heavyai as the install directory.
HEAVYAI_BASE
Path to the storage directory for HeavyDB data and configuration files
heavyai
Must be dedicated to HEAVY.AI. The installation script creates the directory $HEAVYAI_STORAGE/data, generates an appropriate configuration file, and saves the file as $HEAVYAI_STORAGE/heavy.conf.
HEAVYAI_USER
User HeavyDB is run as
Current user
User must exist before you run the script.
HEAVYAI_GROUP
Group HeavyDB is run as
Current user's primary group
Group must exist before you run the script.
HeavyDB includes the utilities initdb for database initialization and generate_cert for generating certificates and private keys for an HTTPS server.
Before using HeavyDB, initialize the data directory using initdb
:
This creates three subdirectories:
catalogs
: Stores HeavyDB catalogs
data
: Stores HeavyDB data
log
: Contains all HeavyDB log files.
disk_cache
: Stores the data cached by HEAVY COnnect
The -f
flag forces initdb
to overwrite existing data and catalogs in the specified directory.
By default, initdb
adds a sample table of geospatial data. Use the --skip-geo
flag if you prefer not to load sample geospatial data.
This command generates certificates and private keys for an HTTPS server. The options are:
[{-ca} <bool>]
: Whether this certificate should be its own Certificate Authority. The default is false
.
[{-duration} <duration>]
: Duration that the certificate is valid for. The default is 8760h0m0s
.
[{-ecdsa-curve} <string>]
: ECDSA curve to use to generate a key. Valid values are P224
, P256
, P384
, P521
.
[{-host} <string>]
: Comma-separated hostnames and IPs to generate a certificate for.
[{-rsa-bits} <int>]
: Size of RSA key to generate. Ignored if –ecdsa-curve is set. The default is 2048
.
[{-start-date} <string>]
: Start date formatted as Jan 1 15:04:05 2011