BK Komal
BK Komal

Reputation: 39

Web application is locked up and CPU usage reached to 100%

We have a web application running which having around 100 users logged in, All clients are connected to server using websync. I was having requirement for keeping the session always live, so I am regenerating session when it is about to expire.

But after 3 or 4 days, I found cpu reached to 100% and application locked, then we need to restart the server to make it working.

Thanks for providing solutions in advance.

Thanks

Upvotes: 2

Views: 376

Answers (3)

Zuuum
Zuuum

Reputation: 1485

As we deal with before, Windows update maybe reason for 100% CPU.

Upvotes: 1

Jerod Venema
Jerod Venema

Reputation: 44652

We've got plenty of clients using WebSync with tens of thousands of concurrent connections (and our On-Demand cluster sits at multiple thousands of users nonstop every day as well), so if you're seeing a CPU lockup, more than likely you've got a threading issue in your code, probably in one of your events (assuming it's related to the WebSync code at all).

Don't forget that the WebSync events are all static, so if you're using shared resources, you'll need to manage them accordingly (i.e., you have to count on the fact that they're multi-threaded). All the WebSync methods themselves are threadsafe, but if you've got stuff in your own events, you'll need to manage that yourself.

Feel free to chat with us directly though, as @Anton suggested!

Upvotes: 2

Macy Abbey
Macy Abbey

Reputation: 3887

Why don't you just extend the session duration to be extremely long instead of regenerating it?

Have you run a profiler against the server when it reaches 100% cpu? This should effectively tell you which methods/classes are being run in how many different threads. With this information you can figure out why your application is running those methods/classes across what I'm guessing is a lot of threads.

Upvotes: 2

Related Questions