aws / aws/aws-codedeploy-agent

High memory consumption and memory leak (still an issue)

Abierto
#308 7 comentarios 12 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
337
Forks
196
Merge medio
10 h 54 min
PR fusionados (30 d)
4

Descripción

Opening a new issue because the problem described here https://github.com/aws/aws-codedeploy-agent/issues/32 still exists.

Basically, when codedeploy finishes, the agent doesn't release the memory back to the OS and the workaround is to restart the agent.

I've enabled verbose logging. Briefly looking at the logs, seems that unzip utility is used to unarchive the bundle:
```
$ cat codedeploy-agent.log | grep "LinuxUtil"
2021-10-10 09:58:26 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Dirs to delete: ["/opt/codedeploy-agent/deployment-root/e23efd0e-df20-42be-91d9-cd495d6e0abc/d-BWQ263SLC"]
2021-10-10 09:58:26 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Deleting dir: /opt/codedeploy-agent/deployment-root/e23efd0e-df20-42be-91d9-cd495d6e0abc/d-BWQ263SLC
2021-10-10 09:58:32 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Command status: pid 4311 exit 0
2021-10-10 09:58:32 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Command output:
2021-10-10 09:58:34 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: extract_zip - dst : /opt/codedeploy-agent/deployment-root/e23efd0e-df20-42be-91d9-cd495d6e0abc/d-5ZDWO7ULC/deployment-archive
2021-10-10 09:58:34 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Executing unzip -qo /opt/codedeploy-agent/deployment-root/e23efd0e-df20-42be-91d9-cd495d6e0abc/d-5ZDWO7ULC/bundle.tar -d /opt/codedeploy-agent/deployment-root/e23efd0e-df20-42be-91d9-cd495d6e0abc/d-5ZDWO7ULC/deployment-archive
2021-10-10 09:58:46 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Command status: pid 4315 exit 0
2021-10-10 09:58:46 DEBUG [codedeploy-agent(4114)]: InstanceAgent::LinuxUtil: Command output:
```

Where can I securely share the 127MB `codedeploy-agent.log` file (generated from a single deployment)? I don't want to share it publicly.

My environment:
EC2 instance running Ubuntu 20
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [aarch64-linux-gnu]
codedeploy-agent 1.3.2-1902

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Compara este informe con el Issue #32 y, a continuación, reproduce un despliegue en Ubuntu 20 con registro detallado. Empieza examinando las entradas de unzip/extracción y limpieza relacionadas con LinuxUtil; se considera terminado cuando se haya identificado por qué la memoria permanece asignada después del despliegue y se haya demostrado que se libera sin reiniciar el agente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
ruby
Área
devops
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.