claudyus / LXC-Web-Panel

LXC Web Panel improved for lxc 1.0+
http://claudyus.github.io/LXC-Web-Panel/
Other
221 stars 68 forks source link

Setting Memory Limit #111

Open inluxc opened 8 years ago

inluxc commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

LXC: 1.0.8

Yep i did install with apt-get.