Kong reload usage

Having some difficulty getting kong reload to work - wondering if anyone had any pointers. Based on the help it seems like this should work:

sudo kong reload -c /etc/kong/kong.conf -p /usr/local/kong/

I’m attempting to set router_update_frequency and reload Kong but it doesn’t seem to take - the only way I can get it to take hold is by doing a hard restart, i.e. sudo systemctl restart kong which causes requests to fail unfortunately. I tried various permutations, with and without the prefix / config files specified, in the Kong directory and not, and so on.

Any help would be most appreciated - thanks!


You need to run kong prepare before reloading the service. Kong creates a .kong_env file in $KONG_PATH (by default /usr/local/kong/.kong_env) where stores the configuration of the running instance. If you make some changes in the configuration file, you need to run first the prepare command and it will update the .kong_env file, and after that you can make the reload and it will work.

You also can edit the systemd unit file (systemd edit kong) and add an extra line before the actual ExecReload that runs kong prepare when you launch systemctl reload kong.


@raleman that worked - thanks!