如何重新加载催化剂中的配置

发布于 2024-09-13 20:54:33 字数 72 浏览 4 评论 0原文

当 Catalyst Web 框架中的配置发生更改并且需要重新加载配置而不重新启动 Catalyst 服务器时,如何重新加载配置。

How to reload the configuration when ever the configuration changed in catalyst web framework and need to reload the configuration with out restarting the catalyst server.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别在捏我脸啦 2024-09-20 20:54:33

您需要重新启动 fastcgi 实例来重新加载 Catalyst 配置,因为该配置主要在启动时应用。

对于您自己的应用程序级别配置,您可以使其基于数据库并编写自己的例程来定期从数据库中获取数据。

如果您想在不停机的情况下重新启动 Catalyst,您可以在多个机器之间进行负载平衡,并重新​​启动每个机器的 fastcgi 进程 (FastCGIExternalServer)。

另一种解决方案是在关闭旧实例之前启动“新实例”,因此始终某事接受()-s新请求。

这两种解决方案都假设您的配置更改并不剧烈,以防止在升级期间使用两种不同配置的应用程序的两个实例同时运行。

You need to restart the fastcgi instance to reload the Catalyst configuration, as the config is applied at startup time mostly.

For your own application level config, you can make it database based and write your own routine that fetches out of a database periodically.

If you want to restart Catalyst without downtime, you can loadbalance between multiple boxes and restart the fastcgi processes per box (FastCGIExternalServer).

Another solution would be to start up the "new instance" before shutting down the old one, so at all times something accept()-s new requests.

Both of these solutions assume that your configuration changes are not drastic to prevent two instances of the application running beside each other with two different configurations for the duration of the upgrade.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文