Skip to content

Commit

Permalink
Merge pull request #2028 from digitallyinduced/amitaibu-patch-4
Browse files Browse the repository at this point in the history
Docs on `systemd` integration
  • Loading branch information
mpscholten authored Jan 24, 2025
2 parents 2f25258 + 410cd00 commit 8696b5a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Guide/deployment.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -878,3 +878,25 @@ The maximum number of subscriptions per websocket connection in IHP DataSync. De
#### `IHP_DATASYNC_MAX_TRANSACTIONS_PER_CONNECTION`

The maximum number of database transactions per websocket connection in IHP DataSync. Defaults to `10`.

## `systemd` Integration

The `deploy-to-nixos` tool now includes systemd integration to improve reliability and reduce downtime for IHP applications. These features are enabled by default when using `ihp.nixosModules.app`.

Key Features:

1. **Systemd Watchdog**:

- The app sends a heartbeat to systemd every 30 seconds via localhost.
- If the app becomes unresponsive, systemd restarts it after 60 seconds.

2. **Socket Activation**:

- Systemd queues incoming HTTP requests during app startup or restarts.
- This eliminates downtime and ensures uninterrupted service.

3. **Automatic Configuration**:

- The `IHP_SYSTEMD` environment variable is set to `"1"` automatically when deploying with `deploy-to-nixos`. If you are deploying differently, you are responsible for setting the variable yourself.


0 comments on commit 8696b5a

Please sign in to comment.