Skip to content

Conversation

@ArneTR
Copy link
Member

@ArneTR ArneTR commented Dec 18, 2023

Our Gunicorn container is using a bash script in the ENTRYPOINT. This is not forwarding signals to childs.

Therefore we need to use init so that the container actually tears down immediately on SIGTERM.

Also NGINX prefers a different stop signal. So we supply it

Source: https://docs.docker.com/compose/compose-file/05-services/#init
Source 2: https://docs.docker.com/compose/compose-file/05-services/#stop_signal

@github-actions
Copy link

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run 9.91542 1596.33 2.51786 641
Measurement #1 9.99074 1596.33 2.51786 635

📈 Energy graph:

 
 7.70 ┤                                       ╭╮                 ╭╮
 7.11 ┤                                       ││                 ││
 6.52 ┤                                       │╰╮           ╭╮   ││
 5.92 ┤                                       │ │           ││   │╰─╮
 5.33 ┤        ╭╮╭╮                           │ │          ╭╯╰─╮ │  ╰╮
 4.74 ┤        ││││                           │ │╭╮╭───╮   │   │ │   │
 4.14 ┤     ╭──╯╰╯╰╮    ╭─╮ ╭╮  ╭─╮   ╭╮╭╮    │ ╰╯╰╯   │  ╭╯   ╰╮│   │        ╭╮╭╮╭╮                          ╭╮╭╮ ╭╮ ╭╮ ╭─╮           ╭╮           ╭╮                                                  ╭╮                                                  ╭╮           ╭─╮                         ╭╮                         ╭╮                       ╭─╮                           ╭╮                          ╭╮                           ╭╮                                                   ╭─╮                                                                                                                      ╭─╮╭──╮                          ╭
 3.55 ┤    ╭╯      ╰────╯ ╰─╯╰──╯ ╰───╯╰╯╰─╮╭─╯        ╰╮ │     ╰╯   │       ╭╯╰╯╰╯╰╮         ╭╮╭╮        ╭╮ ╭╯╰╯╰─╯╰─╯╰─╯ ╰─╮         │╰─╮         │╰─╮         ╭──╮         ╭──╮         ╭──╮         │╰──╮        ╭──╮         ╭──╮         ╭──╮         │╰─╮         │ ╰─╮         ╭╮        ╭╮ ╭╯╰─╮                  ╭─╮╭─╯╰─╮                  ╭╮ │ ╰─╮        ╭─╮╭╮        ╭╮╭─╯╰─╮        ╭─╮         ╭╮ ╭╯╰─╮        ╭─╮╭╮       ╭─╮╭─╯╰╮         ╭──╮        ╭╮ ╭──╮          ╭─╮         │ ╰╮         ╭──╮         ╭─╮         ╭───╮        ╭───╮╭╮          ╭──╮        ╭─╮           ╭──╮         ╭╮            │ ╰╯  ╰╮         ╭╮          ╭╮╭─╯
 2.96 ┤    │                               ││           │ │          │       │      │        ╭╯│││        ││ │               │         │  │         │  ╰╮        │  │         │  │         │  │         │   │        │  │         │  │         │  │         │  │         │   │         ││        ││╭╯   │         ╭╮       │ ││    │        ╭╮        ││ │   │        │ │││       ╭╯││    │       ╭╯ ╰╮        ││ │   │        │ │││       │ ││   ╰╮        │  │        ││ │  ╰╮         │ │         │  │         │  │         │ │         │   │        │   │││          │  │        │ │           │  │        ╭╯╰─╮          │      ╰╮        ││╭╮       ╭╯││
 2.36 ┤    │                               ││           │ │          │       │      ╰╮       │ ╰╯│        ││ │               │         │  │         │   │        │  │         │  │         │  ╰╮        │   │        │  ╰╮        │  │         │  │         │  │         │   │         ││       ╭╯││    │         ││       │ ││    │        ││        ││ │   │        │ │││       │ ││    │       │   │        ││ │   │        │ │││       │ ││    │       ╭╯  │        │╰╮│   │        ╭╯ │         │  ╰╮        │  │         │ │         │   │        │   │││       ╭╮ │  │        │ │╭╮         │  ╰╮       │   │          │       │       ╭╯╰╯│       │ ││
 1.77 ┼────╯                               ╰╯           ╰─╯          ╰───────╯       ╰───────╯   ╰────────╯╰─╯               ╰─────────╯  ╰─────────╯   ╰────────╯  ╰─────────╯  ╰─────────╯   ╰────────╯   ╰────────╯   ╰────────╯  ╰─────────╯  ╰─────────╯  ╰─────────╯   ╰─────────╯╰───────╯ ╰╯    ╰─────────╯╰───────╯ ╰╯    ╰────────╯╰────────╯╰─╯   ╰────────╯ ╰╯╰───────╯ ╰╯    ╰───────╯   ╰────────╯╰─╯   ╰────────╯ ╰╯╰───────╯ ╰╯    ╰───────╯   ╰────────╯ ╰╯   ╰────────╯  ╰─────────╯   ╰────────╯  ╰─────────╯ ╰─────────╯   ╰────────╯   ╰╯╰───────╯╰─╯  ╰────────╯ ╰╯╰─────────╯   ╰───────╯   ╰──────────╯       ╰───────╯   ╰───────╯ ╰╯
                                                                                                                                                                                                                                                                                                                            Watts over time

@ArneTR ArneTR merged commit 8da580c into main Dec 18, 2023
@ArneTR ArneTR deleted the init-stop-signal branch December 18, 2023 11:53
ArneTR added a commit that referenced this pull request Dec 22, 2023
* main:
  Hotfix for check on frequency provider
  Tests run_until must be guard-claused with cleanup routine (#616)
  Fix check if stderr is empty (#613)
  Bump uvicorn[standard] from 0.24.0.post1 to 0.25.0 (#612)
  Fxing the network provider stderror
  Branch and filename are now always not null (#602)
  Adds a more elaborate depends_on test
  Support reading notes from services (#590)
  docker build command in tests now checks reason for docker build failure. If it is a permission issue with the cache, it will continue the rest of the workflow (#576)
  Use depends_on for container startup order (refactored) (#593)
  Bump psycopg[binary] from 3.1.15 to 3.1.16 (#610)
  Added powercap info to hardware_info (#609)
  Changed wording for network infrastructure box (#608)
  Added SIGQUIT to nginx and initi to gunicorn, as we are using bash script in entrypoint (#605)
  Fix frontend flow menu to wrap automatically (#584)
  Bump psutil from 5.9.6 to 5.9.7 (#603)
  Disable Docker CLI hints (#555)
  Create codeql.yml
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

Successfully merging this pull request may close these issues.

2 participants