gpt4 book ai didi

ruby-on-rails - EnvironmentVariables 默认值长度大于 4096

转载 作者:行者123 更新时间:2023-12-01 13:16:33 25 4
gpt4 key购买 nike

我正在尝试将 Rails 应用程序部署到 Amazon Elastic Beanstalk(eb) 环境

我得到了这个错误:

Uploading: [##################################################] 100% Done...
2019-01-24 09:42:16 INFO Environment update is starting.
2019-01-24 09:42:26 ERROR Service:AmazonCloudFormation, Message:Template format error: Parameter 'EnvironmentVariables' default value '[****]' length is greater than 4096.
2019-01-24 09:42:26 ERROR Failed to deploy application.


我找到了这个

The combined size of all environment properties cannot exceed 4,096 bytes when stored as strings with the format key=value.



在亚马逊文档中 here .

我的环境属性键值组合比 4096 个字符大得多。

由于大多数值都是 API 和 Payments 的凭据,因此我最终只有十几个键。

我的应用程序在 Heroku 中运行良好,对 env 变量没有这样的限制。我想知道 eb 中这种限制背后的原因是什么。

有没有人有这方面的经验?

就我而言,我想增加限制(4096)。我不想为了适应 eb 限制而更改我的代码。

我也愿意接受任何解决方法来克服这个 4096 个字符。

提前谢谢了!

最佳答案

Beanstalk 在底层使用 Cloudformation 来提供环境。因此,环境变量是有限制的。你不能增加这个限制,因为它在内核中被硬编码为 PAGE_SIZE .

这是一个不错的resource这解释了解决这个问题的另一种方法。

关于ruby-on-rails - EnvironmentVariables 默认值长度大于 4096,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54344236/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com