Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

I suspect that there is a memory leak somewhere in my PHP code

Nope, 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]
Posted

 

I suspect that there is a memory leak somewhere in my PHP code

Nope, 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!

Posted

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!

Posted

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.

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...