Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CodeDeploy Error Cannot allocate memory - su

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?

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
like image 399
Khushboo Avatar asked Jan 29 '23 13:01

Khushboo


1 Answers

It's likely this memory leak issue in the CodeDeploy agent: https://github.com/aws/aws-codedeploy-agent/issues/32

like image 126
Daniel Silva Avatar answered Feb 03 '23 22:02

Daniel Silva