Skip to content

Add info about explicit background mode conflicting with tt start #4169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/reference/configuration/cfg_basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
and :ref:`pid_file <cfg_basic-pid_file>` parameters must be non-null for
this to work.

.. important::

Do not enable the background mode for applications intended to run by the
``tt`` utility. For more information, see the :ref:`tt start <tt-start>` reference.

|
| Type: boolean
| Default: false
Expand Down
101 changes: 101 additions & 0 deletions doc/reference/configuration/configuration_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2380,6 +2380,107 @@ The ``memtx`` section is used to configure parameters related to the :ref:`memtx
| Default: box.NULL
| Environment variable: TT_MEMTX_SORT_THREADS

.. _configuration_reference_process:

process
-------

The ``process`` defines configuration parameters of the Tarantool process in the system.


- :ref:`process.background <configuration_reference_process_background>`
- :ref:`process.coredump <configuration_reference_process_coredump>`
- :ref:`process.title <configuration_reference_process_title>`
- :ref:`process.pid_file <configuration_reference_process_pid_file>`
- :ref:`process.strip_core <configuration_reference_process_strip_core>`
- :ref:`process.username <configuration_reference_process_username>`
- :ref:`process.work_dir <configuration_reference_process_work_dir>`

.. _configuration_reference_process_background:

.. confval:: process.background

Run the server as a background task.

.. important::

Do not enable the background mode for applications intended to run by the
``tt`` utility. For more information, see the :ref:`tt start <tt-start>` reference.

|
| Type: boolean
| Default: false
| Environment variable: TT_PROCESS_BACKGROUND


.. _configuration_reference_process_coredump:

.. confval:: process.coredump


|
| Type: boolean
| Default: false
| Environment variable: TT_PROCESS_COREDUMP

.. _configuration_reference_process_title:

.. confval:: process.title

Sets the name of the server's process title (what’s shown in the COMMAND column for
``ps -ef`` and ``top -c`` commands).

|
| Type: string
| Default: 'tarantool - {{ instance_name }}'
| Environment variable: TT_PROCESS_TITLE

.. _configuration_reference_process_pid_file:

.. confval:: process.pid_file

Store the process id in this file.

|
| Type: string
| Default: 'var/run/{{ instance_name }}/tarantool.pid'
| Environment variable: TT_PROCESS_PID_FILE

.. _configuration_reference_process_strip_core:

.. confval:: process.strip_core

Whether coredump files should include memory allocated for tuples.
(This can be large if Tarantool runs under heavy load.)
Setting to ``true`` means "do not include".

|
| Type: boolean
| Default: true
| Environment variable: TT_PROCESS_STRIP_CORE

.. _configuration_reference_process_username:

.. confval:: process.username

The name of the system user to switch to after start.

|
| Type: string
| Default: box.NULL
| Environment variable: TT_PROCESS_USERNAME

.. _configuration_reference_process_work_dir:

.. confval:: process.work_dir

A directory where Tarantool working files are stored.

|
| Type: string
| Default: box.NULL
| Environment variable: TT_PROCESS_WORK_DIR

.. _configuration_reference_replication:

replication
Expand Down
14 changes: 14 additions & 0 deletions doc/reference/tooling/tt_cli/start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ For more information about Tarantool application layout, see :ref:`admin-instanc
which is considered a legacy approach since Tarantool 3.0. For information
about using ``tt`` with such applications, refer to the Tarantool 2.11 documentation.

Running in the background
-------------------------

``tt start`` runs Tarantool applications in the background and uses its own watchdog
process for status checks (:ref:`tt status <tt-status>`) and application stopping (:ref:`tt stop <tt-stop>`).

.. important::

Do not switch on the background mode using the cluster configuration
(``process.background: true`` in the YAML configuration) or code (``box.cfg.background = true``)
in applications that you run with ``tt``.
If you start such an application with ``tt start``, ``tt`` won't be able to check
the application status or stop it using the corresponding commands.

Examples
--------

Expand Down