lookyweb Posted February 4, 2021 Posted February 4, 2021 Hello, I have recently launched a website (It is nowhere near finished yet!) on HelioHost; however, the memory consumption of my account increased to an unsustainable level (between 60-80% per day) while the CPU usage is consistent: it is always 1%. Accordingly, I suspect that there is a memory leak somewhere in my PHP code but I do not know where to start looking for it. Therefore I was wondering if there is a way to see which of my website's PHP files use the most amount of memory. If this is possible please tell me! Thank you!If it is not possible then I am open to suggestions on how to address and fix such high memory loads.
lookyweb Posted February 4, 2021 Author Posted February 4, 2021 Are you using wordpress?No, I coded the website by myself. Also, I found an error_log file (in public_html/resources/ajax/dashboard) that is so huge that it nearly crashed my browser! So I think I found the culprit; I will check it out.
Krydos Posted February 5, 2021 Posted February 5, 2021 I suspect that there is a memory leak somewhere in my PHP codeNope, it's node. Node is very memory hungry so this isn't too surprising. Here is where your memory usage for the last 24 hours has come from96.47% /usr/bin/node /home/lookyweb/node/test.js 1.76% cpaneld - serving x.x.x.x 1.51% /opt/cpanel/ea-php73/root/usr/bin/php-cgi 0.13% /usr/local/cpanel/cpanel ./frontend/paper_lantern/load/index.live.php 0.07% /usr/local/cpanel/3rdparty/php/73/bin/php-cgi ./frontend/paper_lantern/load/index.live.php 0.07% /usr/local/cpanel/uapi --json-connect 0.00% [cpaneld - servi]
lookyweb Posted February 6, 2021 Author Posted February 6, 2021 I suspect that there is a memory leak somewhere in my PHP codeNope, it's node. Node is very memory hungry so this isn't too surprising. Here is where your memory usage for the last 24 hours has come from 96.47% /usr/bin/node /home/lookyweb/node/test.js 1.76% cpaneld - serving x.x.x.x 1.51% /opt/cpanel/ea-php73/root/usr/bin/php-cgi 0.13% /usr/local/cpanel/cpanel ./frontend/paper_lantern/load/index.live.php 0.07% /usr/local/cpanel/3rdparty/php/73/bin/php-cgi ./frontend/paper_lantern/load/index.live.php 0.07% /usr/local/cpanel/uapi --json-connect 0.00% [cpaneld - servi] Thank you, I will try to solve the issue!
lookyweb Posted February 6, 2021 Author Posted February 6, 2021 Okay, I think I've solved the issue! (Or maybe not, since I am not a Node.js expert. I will keep an eye on my memory usage for the following weeks, at least.)
lookyweb Posted February 6, 2021 Author Posted February 6, 2021 Okay, I think I've solved the issue! (Or maybe not, since I am not a Node.js expert. I will keep an eye on my memory usage for the following weeks, at least.)Unfortunately, it did not work! Well, time to pay Stack Overflow a visit... Edit (08/02/2021): The memory leak is theoretically solved... I'm testing it now!
lookyweb Posted February 9, 2021 Author Posted February 9, 2021 Just a question: if, for example, my memory usage is above 80%, then that does not necessarily mean that I am using too many resources, right? I mean, I might be using the largest amount of memory amongst all users, but that amount might be only a fraction of what the server can handle.
Krydos Posted February 9, 2021 Posted February 9, 2021 Correct. Even if you're at 100 it's possible to not get suspended. When it's at 100 though it means you're next in line to get suspended if the server performance degrades below an acceptable level.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now