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

Running sitespeed test in pods, after few hours the pods go down #4093

Open
mdvaliyullah opened this issue Feb 21, 2024 · 12 comments
Open

Running sitespeed test in pods, after few hours the pods go down #4093

mdvaliyullah opened this issue Feb 21, 2024 · 12 comments

Comments

@mdvaliyullah
Copy link

Your question

Hi Team,

while running sitespeed tests in pods, I observed that memory usages increases continuously and the tests were scheduled to run every 15 minutes, after few hours the pods go down, we set up the --max-old-space-size to 8GB but still the pod goes down once it reached the threshold. please advise

Thanks,
Valiyullah

@madan
Copy link

madan commented Feb 21, 2024

I assume you are running continually in the same pod; consider using a cronjob to run your tests so the control plane spins up a new pod for each schedule.

@soulgalore
Copy link
Member

Hi @mdvaliyullah can you share more on how you run? I'm thinking maybe there could be some tweak in how we handle memory that could be done. Else as @madan said, starting a new container every time is good.

For long running containers (over days) I've think I have work todo to cleanup Chrome issues, I've seen tmp files etc that probably should be cleaned, but my use case has always been to spin up a new container.

@mdvaliyullah
Copy link
Author

Hi @soulgalore my use case is to run different urls list during each schedule, so i wanted to keep the container running for long period, is there way to clean up the unused memory after each run?

@soulgalore
Copy link
Member

Ok, so the size of the container meets the limits is reached or what happens? As long as the NodeJs process is exited, the only thing that should be in the conainer are the result files like html/videos etc. Are they removed in your current setup?

@mdvaliyullah
Copy link
Author

Yes results folders are cleaned up before starting a new test, once the memory reaches the heap limits the pod get restarted

@soulgalore
Copy link
Member

Ok, so do you have your own container or have you overridden the start script or how do you do it, can you share a little more?

@mdvaliyullah
Copy link
Author

I have own container with sitespeed image. No changes to startup script, just passing the arguments details like url list, iteration when starting the test to the script.

@soulgalore
Copy link
Member

soulgalore commented Feb 22, 2024

Ok. How does it work, how do you keep the container open, isn't closed after a test run?

@mdvaliyullah
Copy link
Author

Yes it is not closed after the test run, the sitespeed image is used as a base image in the container

@soulgalore
Copy link
Member

But you exit node? So like for each test you run, you run the start script? Do you have anything setup to monitor the memory usage, is it constant increasing?

@mdvaliyullah
Copy link
Author

Yes, I checked there is no process running once the test completes. I run the start script for every test once the previously running test completes.
memory usage gradually increases for each test once it reaches the usage threshold the pods gets restarted.

@soulgalore
Copy link
Member

Ok, can you get more granularity to see what uses the memory? Since you use your own container, do you have something else running in it?

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

No branches or pull requests

3 participants