susanBuck / e15-spring22

0 stars 0 forks source link

DigitalOcean Server Becomes Unresponsive #9

Closed patrickgarsow-harvard closed 2 years ago

patrickgarsow-harvard commented 2 years ago

Hello everyone,

I am wondering if anyone else is having the issue that I seem to be having with my server instance at DigitalOcean. Everything will work find but then over a period of time the CPU utilization goes over 100% and the server becomes unresponsive. The workaround is that I reboot the server and it works fine for some period of time but within a few days it is back up to 100% utilization. I would say it might be a problem with my code...except we haven't really written much in the way of problematic/questionable code that would cause this. The only thing I can think of it maybe the tools we installed when setting up VSCode. This was an image of resource utilization before the reboot. BeforeReboot

After the reboot you can see the graph drops down. AfterReboot ll on the server.

susanBuck commented 2 years ago

Also curious if anyone else is seeing this problem.

Patrick - Can you tell me what extensions you have enabled on the server (beyond the ones I recommend)? I'd like to try and recreate your conditions on my own server to help troubleshoot.

Also, if I can't recreate on my end, would you mind if I log into your server to take a look? (ref: https://hesweb.dev/e15/notes/infrastructure/servers-config#instructor-server-access)

patrickgarsow-harvard commented 2 years ago

Can you tell me what extensions you have enabled on the server (beyond the ones I recommend)?

The following extensions are installed on the DigitalOcean server: InstalledExtensions

Also, Instructor your welcome to check out the server. I have verified your public key has been added.

susanBuck commented 2 years ago

Thanks, @patrickgarsow-harvard! I'll take a look tomorrow morning and get back to you.

susanBuck commented 2 years ago

Hi @patrickgarsow-harvard -

I did some investigating on this issue this morning. I don't have a definitive answer, but I have some thoughts:

Based on our email thread related to this issue, I believe your problem happened before you enabled the swap file. VSCode remote dev can be very memory intensive at times, so it's possible it spiked your memory usage, causing your CPU usage to then subsequently spike until the server locked up.

Given this, it's possible that now that you have swap enabled, you won't hit this issue again. But, only time will tell on that.

Let's keep this thread open - in case other students run into the same problem - and continue to monitor the situation.

Side note: My favorite tool for monitoring server usage is the command htop - it provides a nice clear output showing cpu, memory, and swap usage for your different processes. I'll be running this as I do remote dev on my own server to see if I can catch any issues/patterns.

patrickgarsow-harvard commented 2 years ago

Thanks @susanBuck1

I have yet to experience this issue again since re-attempting the swap file implementation. I might have missed a step, errored out a step and didn't notice, or something else but it is working as of now. I will continue to monitor and if the issue happens again I will reopen the issue here.