Skip to main content

Automatic Core Startup

Running the Server Automatically

Written by Petr Pech

The default server setting is such that the application part only starts on the first request. This reduces the load at startup during normal operation — the server startup itself then takes about half a second.

In some cases, however, this behavior is not desirable: the first request after server startup takes about 20 seconds, because the accounting core only starts during its processing. Therefore, it is possible to configure the core to start automatically right after the server starts.


Configuration

Simply edit the configuration file flexibee-server.xml (where to find it — on Linux typically /etc/flexibee/flexibee-server.xml) and add the option startKernel:

<entry key="startKernel">true</entry>

The change will take effect after the server is restarted.

💡 If you have Web Hooks enabled in the configuration with the option enableHooks set to true, the core will start automatically because of them anyway, and you don't need to set startKernel.


When it's worth it

  • Integrations that call the API right after a server restart — otherwise, the first request may take tens of seconds to complete, and the integration might fail due to a timeout.

  • Servers with regular restarts (for example, after deploying an update), where the application needs to be available immediately.

  • Operation with Web Hooks — in that case, the core needs to start anyway.

Conversely, for installations that are started frequently but where the API is called only occasionally, the default delayed startup is more efficient.


Related

Did this answer your question?