Skip to content
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

Setting Memory Limit #111

Open
inluxc opened this issue Mar 17, 2016 · 2 comments
Open

Setting Memory Limit #111

inluxc opened this issue Mar 17, 2016 · 2 comments

Comments

@inluxc
Copy link

inluxc commented Mar 17, 2016

After i set memory limit in LXC-Web_Panel, i get this error.

 lxc-start 1458216455.373 ERROR    lxc_cgmanager - cgmanager.c:cgm_setup_limits:1378 - call to cgmanager_set_value_sync failed: invalid request
      lxc-start 1458216455.373 ERROR    lxc_cgmanager - cgmanager.c:cgm_setup_limits:1381 - Error setting cgroup memory:lxc/redis limit type memory.memsw.limit_in_bytes
      lxc-start 1458216455.373 ERROR    lxc_start - start.c:lxc_spawn:952 - failed to setup the cgroup limits for 'redis'
      lxc-start 1458216455.382 ERROR    lxc_start - start.c:__lxc_start:1121 - failed to spawn 'redis'
      lxc-start 1458216460.389 ERROR    lxc_start_ui - lxc_start.c:main:341 - The container failed to start.
      lxc-start 1458216460.389 ERROR    lxc_start_ui - lxc_start.c:main:343 - To get more details, run the container in foreground mode.
      lxc-start 1458216460.389 ERROR    lxc_start_ui - lxc_start.c:main:345 - Additional information can be obtained by setting the --logfile and --logpriority options.
@cocoy
Copy link

cocoy commented Mar 17, 2016

vagrant@vagrant-ubuntu-trusty-64:~$ sudo cat /var/lib/lxc/fedx/config
lxc.include = /usr/share/lxc/config/fedora.common.conf
lxc.arch = x86_64
lxc.rootfs = /var/lib/lxc/fedx/rootfs
lxc.utsname = fedx
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0
lxc.network.hwaddr = 00:16:3e:05:79:5d
lxc.cgroup.memory.limit_in_bytes = 128M
lxc.start.auto = 0
lxc.loglevel = 0

I test it on my vagrant machine running lwp then changing memory from 128M to 256M seems working good. Probably something on your setup did you install using apt-get? My install is from source. How about the lxc versions used?

vagrant@vagrant-ubuntu-trusty-64:~$ sudo cat /var/lib/lxc/fedx/config
lxc.include = /usr/share/lxc/config/fedora.common.conf
lxc.arch = x86_64
lxc.rootfs = /var/lib/lxc/fedx/rootfs
lxc.utsname = fedx
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0
lxc.network.hwaddr = 00:16:3e:05:79:5d
lxc.cgroup.memory.limit_in_bytes = 256M
lxc.start.auto = 0
lxc.loglevel = 0

@inluxc
Copy link
Author

inluxc commented Mar 17, 2016

I notice, that is only the swap memory giving the error.

LXC: 1.0.8

Yep i did install with apt-get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants