MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Website is using 100% CPU  (Mono Support )

Viewed 22392 time(s), 22 post(s) 5/4/2016 3:24:40 PMby super
super

super

5/4/2016 3:50:03 PM
I have a monox website hosting with 3rd party hosting company VPS (3GB ram).

My website is always slow because hosting tech support showed me that my app pool for the site is using all the resources. The CPU usage is always 100%.The tech support restart the IIS to free resources but it does not solve the problem. 

Hosting tech support is saying, the problem is with the website code (I am using MonoX "as-is", no customization) - Version v4.9.40.4906

How can I track or troubleshoot what code or script is the cause of the problem here? any code that can write a txt log with the path and location of code causing the problem?

Monox Team - Can you plz help?

If you can provide me any piece of code that I can place on the website that can locate the issue would be very helpful?
This content has not been rated yet. 
6018 Reputation 709 Total posts
zhuber

zhuber

5/5/2016 6:07:25 AM
Hi super,

Could you tell us how many active users do you have? 

If you could also provide us with some CPU information, how many CPUs do you have?

Regards,
Zeljko
This content has not been rated yet. 
145 Reputation 18 Total posts
super

super

5/5/2016 11:54:07 AM
On average I get 200-250 unique visitors everyday (I can't share the site URL unfortunately).

At any given time active users varies from 0 to 30 (there are times when there are no active users).

VPS Specs:
- Windows 2012 
- 35 GB Storage (Nimble SAN Storage)
- SQL Server 2014
- 3 GB RAM
- 250 GB Monthly Bandwidth
- 2 Virtual CPU Allocation
- ASP.Net 4.5
- IIS 7
- 1Gbps Connectivity

Note: I worked with my hosting to upgrade to "4 Virtual CPU Allocation" but experienced the same problem of 100% CPU usage so switched back to 2 Virtual CPU as no reason to spend extra money when I am experiencing the same problem with additional CPU.

This content has not been rated yet. 
6018 Reputation 709 Total posts
khorvat

khorvat

5/5/2016 2:18:57 PM
Did you check logs in order to see if there are any exceptions that may cause CPU issues ?
This content has not been rated yet. 
15993 Reputation 2214 Total posts
super

super

5/5/2016 2:34:41 PM
@khorvat - You mean application logs within Monox?

Update: I just looked into - MonoX/ApplicationData/Logs/

The last log file created is from 2014 year.
This content has not been rated yet. 
6018 Reputation 709 Total posts
khorvat

khorvat

5/6/2016 8:29:22 AM
Can you please check the file permissions on ApplicationData folder, MonoX should have write permissions. Also is there a large amount of log files or any other files in any of the folders MonoX is accessing ? 
This content has not been rated yet. 
15993 Reputation 2214 Total posts
super

super

5/6/2016 1:56:32 PM
@khorvat, sure I can look into the permissions.

Just need to clarify one thing - what do you mean by "any other files in any of the folders MonoX is accessing"?
This content has not been rated yet. 
6018 Reputation 709 Total posts
khorvat

khorvat

5/6/2016 4:06:27 PM
"Just need to clarify one thing - what do you mean by "any other files in any of the folders MonoX is accessing"?"
We just need to make sure that we didn't hit one corner case where NTFS 8.3 naming is producing 100% CPU usage when MonoX access the folder with too many files (issue described here).

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
super

super

5/6/2016 4:29:48 PM
Ok - so you would like me to check if I have any sub-folder within "Monox" folder that may have a large number of files?
This content has not been rated yet. 
6018 Reputation 709 Total posts
super

super

5/9/2016 9:32:53 AM
Hi Khorvat - I would appreciate if you could please provide an answer to my above question and explain a little bit what the NTFS issue means? I did read the post and what I understood is that, if there are way too many files in a folder, it can slow down the site and increase CPU usage.

Update: I logged into my VPS and found these logs (see attached).
This content has not been rated yet. 
6018 Reputation 709 Total posts
1 2 3