Monday, March 2, 2020

Re: How to debug Daphne CPU 100% issue


can you solve my this issue


On Mon, Mar 2, 2020 at 3:38 AM Integr@te System <datacentralize@gmail.com> wrote:
Hi Fogmoon,

Plz show again your image file's result and addition check 
iostat -ctz
netstat -anob

to see more root cause.

Dont for get update python version.

Nice.


On Mon, Mar 2, 2020, 13:32 Fogmoon <ifogmoon@gmail.com> wrote:
Hi, 

Could you please give some suggestions to inspect the high CPU (most time above 90% and some time above 100%) consumed by Daphne. 

Environment:
  • OS: Ubuntu 18.04.1 LTS x86_64 GNU/Linux
  • Django: 2.1.1
  • Daphne: 2.3.0
  • Channels: 2.2.0
  • channels-redis: 2.4.0
Just use the Daphne as the websocket server with redis as the Channel layer. 

Now I do the following steps:
  1. top command show the daphne process consume high cpu
  2. check the thread numbers with ps -o thcount 22549, which shows 40. 
  3. check the websocket connected numbers with redis cli: ZCOUNT asgi::group:USER_MESSAGE -inf +inf, which shows 190
  4. check the system call with sudo strace -c -p 22549 for a minute, the result as the following:


Best Wishes.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/913143a8-c8c8-47ce-a96d-6c9d349eac6a%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAP5HUWobxGBszupnc_3iGNMi1j1mF18VJ%3DkjkbGXxvYN28KmNg%40mail.gmail.com.


--

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAA6pdZ8vW2BH_ZmUVUHa2Ppn935Rjm5WPV4E8dJhyVuEh88mgA%40mail.gmail.com.

No comments:

Post a Comment