mono / mod_mono

Apache module to host the XSP ASP.NET host
http://www.mono-project.com/Mod_mono
Apache License 2.0
30 stars 28 forks source link

mono using 99% CPU, still trying to access mod-mono-server2.exe #9

Open jrg-github opened 6 years ago

jrg-github commented 6 years ago

I've installed mod_mono and configured Apache2 to use for hosting an asp.net mvc site.

This morning, our Network Operations Center sent us an email, saying that a process called 'mono' was using 99% of our CPU on the server, which is running Red Hat 7.5. I checked our Stage server to see if the behavior was consistent, but Stage was fine. Stage is also running Red Hat 7.5.

When I pull up the Apache error logs (for both servers), I see entries for not being able to open '/usr/lib/mono/4.5/mod-mono-server2.exe' because it does not exist. However, mod_mono and Apache2 have been configured to not use mod-mono-server2.exe.

I have verified that the configuration of /etc/httpd/conf.d/mod_mono.conf file is correct and in no way references mod-mono-server2. I have also verified that the configuration of /etc/httpd/conf/httpd.conf in no way references mod-mono-server2. httpd.conf explicitly uses '/usr/lib/mono/4.5/mod-mono-server4.exe'.

I have also verified that /usr/bin/mod-mono-server has been updated to point to mod-mono-server4.exe.

Is the attempt at running mod-mono-server2 contributing to mono taking up so much CPU? Is there anywhere else I should be looking to make sure mod_mono is not configured to use mod-mono-server2?

Thank you very much for your time and help.

DDoctorzeus commented 5 years ago

I am also having this issue.

Find the apache threads first start running start threads using 100% of the the core they are running on. This continues for about 5-10 minutes and then followed by a mod-mono-server4 instance running using up the core again. During this process the websites running under mod-mono are throwing 504 errors.

After this occurs I then find the website is accessible however this process has to be repeated for each page. However login pages and any server-side c# code doesn't seem to work!

Did you ever figure out what was wrong with this and/or has a fixed been released?

Many Thanks

DDoctorzeus commented 5 years ago

So after a VERY VERY long process of debugging I finally found (at least for me) why my system is doing this.

It seems after upgrading past systemd and systemd-sysvcompat version 239.303 this starts happening. Seems very bizarre that the problem is with systemd! Hopefully this will help someone who is more familiar with systemd and kernel security as its out of my depth!

DDoctorzeus commented 5 years ago

No releases since April 2017, unable to contact original developer/maintainer as apparently email is no longer valid.

Unable to find a solution to this in basically any forum. Am I to assume this project is now dead?

Earlz commented 5 years ago

Seeing same issue here as well, also on Arch Linux. My only option appears to be to restore from backups and use an out of date server until I have time to convert the project to .NET Core. Seems mod_mono is dead

DDoctorzeus commented 5 years ago

Seeing same issue here as well, also on Arch Linux. My only option appears to be to restore from backups and use an out of date server until I have time to convert the project to .NET Core. Seems mod_mono is dead

Our current workaround was to setup xsp instances manually running on different ports for each site. Then we used apache to proxy forward this to the specific instance. We haven't tried using manually specified application pools for mod_mono yet as frankly want to remove it from our dev server.

We have converted all sites still in development to .net core and completed ones will be run as legacy until no longer needed.