Skip to content

Implement better ipc communication to ghost run process #472

Closed
@acburdine

Description

@acburdine

One thing that can be somewhat confusing currently when using the systemd process manager in the CLI is the fact that ghost start exits quickly with the message that ghost has started, when in fact it can sometimes take 20-30 seconds to actually start (time may vary from server to server based on a number of factors). Conversely, when you run ghost start using the local process manager, it doesn't exit as quickly, but when it does exit, ghost has started.

The reason for this difference is that the local process manager spawns the ghost run subprocess directly, and thus can communicate with it over an IPC tunnel, exiting once ghost has fully started. Systemd, on the other hand, must go through the intermediary process of systemctl, which has no way of letting the ghost start process know once the process has completely started. Other process manager extensions may also have the same issue depending on how they're implemented and how the underlying process manager functions.

To make things more consistent between process managers, the CLI should use a more advanced method of ipc tunneling (using something like https://www.npmjs.com/package/node-ipc).

Note: this would also potentially open up opportunities for improvement in other areas: for example, ghost update could interface with the ghost run process and tell it to run in maintenance mode before modifying the database.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions