Infinite Socket Requests:- CPU High Usage Python & Node

Hi All!!

After fresh installation, when I am trying to execute the bench start command, It’s keep showing me these logs on my terminal:

/api/method/frappe.async.get_user_info?

96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17:19] "GET /api/method/frappe.async.get_user_info?sid=16040215b5eeac469553cee85340634dacd5cb03cb8c973e77e64f96 HTTP/1.1" 200 -
00:17:19 web.1            | 146.185.137.180 - - [04/Dec/2017 00:17

Output of Top Command:

top - 00:31:40 up 17:55,  2 users,  load average: 3.27, 3.30, 2.36
Tasks: 127 total,   2 running, 114 sleeping,   2 stopped,   9 zombie
%Cpu(s): 81.0 us, 10.5 sy,  0.0 ni,  5.6 id,  0.0 wa,  0.0 hi,  2.6 si,  0.3 st
KiB Mem:   1016732 total,   970648 used,    46084 free,     8952 buffers
KiB Swap:        0 total,        0 used,        0 free.    62868 cached Mem

 2784 navdeep   20   0  865744  77208   3976 S 58.0  7.6   8:21.52 python                                                                                                  
 2784 navdeep   20   0  873932  77176   3976 S 65.0  7.6   8:32.38 python                                                                                                  
 2352 navdeep   20   0 1410900 258296   6028 R 18.6 25.4   2:26.87 node                                                                                                    
 6889 mysql     20   0  919512 151528  15176 S  3.6 14.9   0:28.04 mysqld                                                                                                  
 2344 navdeep   20   0   56688  24428   1652 S  3.0  2.4   0:23.32 redis-server                                                                                            
 2313 navdeep   20   0  119044  10732    228 S  1.3  1.1   0:08.54 honcho                                                                                                  
 2300 navdeep   20   0   45420  13296   2672 S  0.7  1.3   0:10.58 honcho                                                                                                  
 2339 navdeep   20   0  121628  40416   2816 S  0.7  4.0   0:03.78 python                                                                                                  
26087 navdeep   20   0   25224   3076   2576 R  0.7  0.3   0:00.56 top                                                                                                     
    7 root      20   0       0      0      0 S  0.3  0.0   0:30.30 rcu_sched                                                                                               
32259 navdeep   20   0  100132   1440      0 S  0.3  0.1   0:41.28 sshd                                                                                                    
32653 redis     20   0   40300   4348      0 S  0.3  0.4   0:03.97 redis-server                                                                                            
    1 root      20   0   37476   3216   1624 S  0.0  0.3   0:04.80 systemd                                                                                                 
    2 root      20   0       0      0      0 S  0.0  0.0   0:00.01 kthreadd                                                                                                
    3 root      20   0       0      0      0 S  0.0  0.0   0:01.43 ksoftirqd/0                                                                                             
    5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H                                                                                            
    8 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcu_bh                                                                                                  
    9 root      20   0       0      0      0 S  0.0  0.0   0:22.42 rcuos/0                                                                                                 
   10 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcuob/0                                                                                                 
   11 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 migration/0                                                                                             
   12 root      rt   0       0      0      0 S  0.0  0.0   0:00.56 watchdog/0                                                                                              
   13 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 khelper                                                                                                 
   14 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kdevtmpfs                                                                                               
   15 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 netns                                                                                                   
   16 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 perf                                                                                                    
   17 root      20   0       0      0      0 S  0.0  0.0   0:00.05 khungtaskd                                                                                              
   18 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 writeback                                                                                               
   19 root      25   5       0      0      0 S  0.0  0.0   0:00.00 ksmd                                                                                                    
   20 root      39  19       0      0      0 S  0.0  0.0   0:02.56 khugepaged                                                                                              
   21 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 crypto                                                                                                  
   22 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kintegrityd                                                                                             
   23 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 bioset                                                                                                  
debug2: channel 0: window 998919 sent adjust 496570  0.0   0:00.00 bioset                                                                                                  
   24 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kblockd                                                                                                 
   25 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 ata_sff                                                                                                 
   26 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 md                                                                                                      
   27 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 devfreq_wq                                                                                              
   31 root      20   0       0      0      0 S  0.0  0.0   0:47.75 kswapd0 

You can post technical queries on discuss.frappe.io

For those who may face this issue, try to downgrade the socket.io version: npm install socket.io@1.7.4

It worked for me.

2 Likes