Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OOM on API Key change #1428

Closed
agustiza opened this issue Aug 1, 2023 · 3 comments · Fixed by #1606
Closed

OOM on API Key change #1428

agustiza opened this issue Aug 1, 2023 · 3 comments · Fixed by #1606
Assignees
Labels
3 Story Point Estimate bug Something isn't working as designed/intended oct-dec qtr Represents proposed work item for the Oct-Dec quarter

Comments

@agustiza
Copy link

agustiza commented Aug 1, 2023

Description

Running inside docker containers.

We recently had an API key rotation for the new relic agent on our non productive environments as a way to save costs by disabling monitoring and logging.

We suddenly found out that we were having constant OOMs. Troubleshooting a bit we found out that the culprit was the New Relic Agent.

Sadly I cannot share a reproducible project.

Troubleshooting or NR Diag results

Steps to Reproduce

Very little I can share but it's pretty standard setup.

## Dockerfile
RUN wget "http://download.newrelic.com/newrelic/java-agent/newrelic-agent/current/newrelic-java.zip"
RUN unzip newrelic-java.zip -d "/app"

##Bash Script that runs on entrypoint
if [ "$USE_NEW_RELIC" = "true" ]; then
        echo -n "Setting New Relic..."
        if [ -f /run/secrets/newrelic_license_key ]; then
            NEWRELIC_LICENSE_KEY=$(cat /run/secrets/newrelic_license_key)
            NEW_RELIC="-javaagent:/app/newrelic/newrelic.jar"
            NEW_RELIC=$NEW_RELIC" -Dnewrelic.environment="${ENVIRONMENT}
            NEW_RELIC=$NEW_RELIC" -Dnewrelic.config.license_key="${NEWRELIC_LICENSE_KEY}
            NEW_RELIC=$NEW_RELIC" -Dnewrelic.config.app_name="${ENVIRONMENT}_${SERVICE_NAME}
            echo "New Relic set."
        else
            echo "New Relic licence key is not set."
            exit 1
        fi
    fi
apk add openjdk8
jps #pid 547
jcmd 547 GC.class_histogram | less
/app # jstat -gcutil 547 250 10
  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT
  0.00   0.00  99.68  99.99  97.34  95.57 164830 1507.445 113654 254514.054 256021.499
  0.00   0.00 100.00  99.99  97.34  95.57 164830 1507.445 113654 254514.054 256021.499
  0.00   0.00 100.00  99.99  97.34  95.57 164830 1507.445 113654 254514.054 256021.499
  0.00   0.00 100.00  99.99  97.34  95.57 164830 1507.445 113654 254514.054 256021.499
  0.00   0.00 100.00  99.99  97.34  95.57 164830 1507.445 113654 254514.054 256021.499
  0.00   0.00 100.00  99.99  97.34  95.57 164830 1507.445 113654 254514.054 256021.499
  0.00   0.00 100.00  99.99  97.34  95.57 164830 1507.445 113654 254514.054 256021.499
  0.00   0.00 100.00  99.99  97.34  95.57 164830 1507.445 113654 254514.054 256021.499
  0.00   0.00 100.00  99.99  97.34  95.57 164830 1507.445 113654 254514.054 256021.499
  0.00   0.00 100.00  99.99  97.34  95.57 164830 1507.445 113655 254516.281 256023.726

image

Your Environment

Docker container using openjdk:8-jre-alpine openjdk:8-jdk-alpine
Current New Relic Agent version

@agustiza agustiza added the bug Something isn't working as designed/intended label Aug 1, 2023
@workato-integration
Copy link

@kford-newrelic kford-newrelic added estimate Issue needing estimation 3 Story Point Estimate and removed estimate Issue needing estimation labels Aug 9, 2023
@kford-newrelic
Copy link
Contributor

@agustiza can you confirm : when you did the key rotation, was the new key a valid or invalid key?

@agustiza
Copy link
Author

I'm not 100% sure but I think it was a purposedly invalid key.

Should be around 25-26th April 2023.

@kford-newrelic kford-newrelic added the oct-dec qtr Represents proposed work item for the Oct-Dec quarter label Sep 15, 2023
@obenkenobi obenkenobi self-assigned this Oct 16, 2023
@kanderson250 kanderson250 moved this from To do to In progress in Java Engineering Board Nov 1, 2023
@kanderson250 kanderson250 moved this from In progress to Needs Review in Java Engineering Board Nov 27, 2023
@github-project-automation github-project-automation bot moved this from Needs Review to Code Complete/Done in Java Engineering Board Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 Story Point Estimate bug Something isn't working as designed/intended oct-dec qtr Represents proposed work item for the Oct-Dec quarter
Projects
Archived in project
4 participants