Question:
codedeploy failed after few deployments(php application) with error
“Cannot allocate memory – su” but in instance its sowing 51% memory in use.
What could be reason for it?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
Error. InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Error during perform: Errno::ENOMEM - Cannot allocate memory - su - /usr/share/ruby/open3.rb:211:in `spawn' /usr/share/ruby/open3.rb:211:in `popen_run' /usr/share/ruby/open3.rb:99:in `popen3' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/hook_executor.rb:141:in `execute_script' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/hook_executor.rb:115:in `block (2 levels) in execute' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/hook_executor.rb:103:in `each' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/hook_executor.rb:103:in `block in execute' [centos@ip-10-196-21-200 codedeploy-agent]$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda1 41926416 21195568 20730848 51% / devtmpfs 487892 0 487892 0% /dev tmpfs 507480 0 507480 0% /dev/shm tmpfs 507480 38336 469144 8% /run tmpfs 507480 0 507480 0% /sys/fs/cgroup tmpfs 101496 0 101496 0% /run/user/1000 |
Answer:
It’s likely this memory leak issue in the CodeDeploy agent: https://github.com/aws/aws-codedeploy-agent/issues/32