AdministrationConfiguration Files
Process Configuration
Configure how the Gigantics application runs as a process, including daemon mode settings.
Configuration Properties
The process configuration section in your config/default.yaml file controls how Gigantics runs as a system process:
process:
daemon: false
workers: 0Property Details
daemon
- Type: Boolean
- Default:
false - Description: Controls whether Gigantics runs as a daemon process in the background
workers
- Type: Number
- Default:
0 - Description: Controls Node.js worker process forking:
-1: Run everything in the main process (no forking)0: Fork to all available CPUsN: Fork to exactly N worker processes
Examples
Standard Process Configuration
process:
daemon: false
workers: 0Daemon Mode Configuration
process:
daemon: true
workers: 0Worker Process Configuration
process:
daemon: false
workers: 4Disable Worker Forking
process:
daemon: false
workers: -1Running as a Daemon
To run Gigantics as a daemon process, you can either:
-
Set
daemon: truein the configuration file:process: daemon: true workers: 0 -
Use the command line flag:
./gig start -d
Worker Process Options
Gigantics supports forking Node.js worker processes to utilize multiple CPU cores:
- Single process (
workers: -1): Runs everything in the main process with no forking, good for development - All CPUs (
workers: 0): Forks a worker process for each available CPU core - Specific number (
workers: N): Forks exactly N worker processes
Best Practices
- Development: Use
daemon: falseandworkers: -1for easier debugging - Production: Consider using
daemon: truefor background operation - Performance: Fork worker processes (
workers: 0) in production for better performance - Resource Management: Set a specific number of workers if you need to limit resource usage
Testing Configuration Changes
After modifying process configuration, restart the application:
./gig stop
./gig startYou can also start with specific flags to override the configuration:
# Run as daemon regardless of config
./gig start -d
# Run with specific number of workers
./gig start -w=4