-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Error on first run - Nginx memory allocation #208
Comments
You don't have enough memory. I've run into this problem before on a small 512mb digital ocean droplet and was able to lower the lua shared dict memory which solved my issue. Keep in mind Cassandra also allocates ~350mb for the JVM so you'll be cutting it pretty close if you're running both Kong and Cassandra on the same machine. Here's what you can try: Open up Change the line |
You should also raise the shared memory (default is Place an entry in
Which will be processed at your next reboot and set it to |
Kk. Will try a larger droplet, and if I still run into issues, I'll try the |
A larger droplet will definitely work. I just tested a brand new DO 512mb droplet, followed these instructions and set @nijikokun why do you recommend upping the shared memory? |
@montanaflynn to ensure everything will run smoothly throughout its lifetime. |
@nijikokun all droplet sizes (and AWS instances types) have a default of 33554432 for the shared memory when running Ubuntu 14.04, I think upping it would potentially make this issue worse by allocating more memory to something other than Kong or Cassandra. It's not something I would say is necessary to have everything run smoothly. |
we should put these things in the doc somewhere. or when we'll add DO. |
At this scale it wouldn't really have much of an effect, but you should really manage your shared memory, especially if you're planning on scaling something properly, especially when dealing with databases. |
Sure, my response was specific to this issue in regards to running Kong with low memory constraints.
I think it's "solved" for @therebelrobot but let's keep the issue open until @thefosk or @thibaultcha can comment on lowering |
Agreed, this is why I had removed my comment, it should be set lower, perhaps
I thought you meant in general my apologies. |
@augusto we will have recommendations for common setups ranging from this type of usage (development, one machine) all the way to clusters large enough to handle billions of requests a day (enterprise, multi-datacenter). Setting system-level performance tweaks inside premade images and finding optimal performance in benchmarks will decrease server costs for everyone so it's good to have these discussions on |
I can verify this is "solved" for me, I'm fine leaving this open for discussion 👍 |
I was thinking to lower the shared memory from 512 to 256 or possibly 128MB, which should still be plenty of memory for Kong to function properly. |
That would be good for a default but I think it should also be an option at the top of kong.yml like the ports so people can change it depending on their specific setup, right now there's a big scary comment above it which is essentially saying "don't change this". |
@montanaflynn are you referring to this https://github.com/Mashape/kong/blob/master/kong.yml#L14-L15 ? |
I think it would be good as an option as well. Comment about don't change this: @thefosk http://getkong.org/docs/0.2.0-2/configuration/#nginx |
Oh okay, so regarding the ports those can be changed without changing the nginx configuration using these properties: |
@thefosk yes, and it would be nice to make such an option for this value as well: |
I have added a new property called |
The first option worked thanks. Using an Ubuntu 14.04 thank @montanaflynn |
Ubuntu 14.04 - digitalocean
After I installed Oracle Java 8, Cassandra, Lua5.1, and Kong, I run
sudo kong start
and I get the following error:Any ideas how to get around that?
The text was updated successfully, but these errors were encountered: