5

My server has constaly 40% CPU usage.... Even when there are NO requests.

I'm searching "wtf is going on" for the past 2 days.

0 results. Clients are unhappy, sales team is unhappy. Noone is happy and I don't have an answer. Grrrrrrr.

*Goes back to reading logs

By server I mean Azure WebApp, not a VM/ohysical server

Comments
  • 1
    What stack?
  • 0
    @spongessuck

    .net 4.7 mixed with Azure functions with .nbet core, on the same service plan.
  • 0
    Have you isolated the offending app?
  • 0
    @spongessuck Yes and no. There is only 1 webapp running (And 1 staging slot).

    Cutting azure functions doesn't change a thing. Can't cut webapp as it's in production (But will do this night for testing)

    Edit : yes it is a web app. I stopped staging, republished on staging, swaped them, stopped new staging : CPU Usage 1%.

    Do I have infinite loop somewhere ? :(
  • 0
    So it's not the function I guess.

    As for the net47 app, what prod work is it doing if there aren't any requests?
  • 0
    Or it is getting requests just not all the time.
  • 0
    @spongessuck None.

    It's pretty SQL heavy app, but if there are no requests it's not supposed to do a thing. And most of heavy lifting is done by Azure functions (App ships a message in a queue and function pick it up).

    Ok, soooo now I have ice 1% usage 9I guess timed Azure functions). here are stats (users are asleep lol, the few requests you see I generated).

    (Note CPU scale is by core, not toal of 4xcores)
  • 0
    @spongessuck really feels like we have infinite loop somewhere :(

    No idea how to track it YET !
  • 0
    Idk looks like responses are pretty fast.

    That's more like 25% load isn't it?
  • 0
    @spongessuck Hmmmm

    I think there is an issue with "slow" sql calls. I'll start checking it.

    my self with only 10 tabs open (On the slowest page of the app tho), I managed to put cpu at 100% (so 400% on screen )
  • 0
    Bizzare thing is memory drop to 0, is it rebooting lol?

    Thanks for debug assistance tho ! Pushed me to do some unusual tests
  • 0
    Some asynchronous call thats not shutting down properly? Or leaving connections/sockets/services running during the call?
  • 0
    @lynkfox It doesn't use direct sockets or anything. ONE thing I should check is a 3d party lib (Link with billing system). Maybe something there
  • 0
    Azure ? oh .....
  • 0
    Any schedulers/cron jobs running inside the app and hitting the databse or something?
  • 0
    Check all "db change"/"db inspection" observers.
    This might be caused by a change to Table A, triggering observer 1, that makes a change to table B, trigerring Observer 2, that makes a change to table A - and completing a circle.

    3rd party libs are usualy not the cause - unless you are using it wrong.
  • 0
    Ahh the ol' good one while loop performance improvement :D?

    While(true){
    Thread.sleep(4000); //lower this number when performance improvement needs to be done

    }
Add Comment