I have a logstash listening on a single port that has accepted traffic from filebeats.
It was working fine for a few hours.
Now I've stopped all the filebeats, there is no incomming traffic on the listened port.
But I can see the process is still consuming 100-200% of cpu (16-core architecture).
this is a thread list from the top command:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
443328 idam 20 0 6144m 764m 14m S 14.3 1.2 41:27.93 java
443336 idam 20 0 6144m 764m 14m R 12.3 1.2 104:46.11 java
443335 idam 20 0 6144m 764m 14m R 12.0 1.2 104:46.30 java
443337 idam 20 0 6144m 764m 14m R 12.0 1.2 104:46.40 java
443338 idam 20 0 6144m 764m 14m R 12.0 1.2 104:46.36 java
443325 idam 20 0 6144m 764m 14m S 6.3 1.2 39:56.15 java
443326 idam 20 0 6144m 764m 14m S 6.3 1.2 39:57.65 java
443330 idam 20 0 6144m 764m 14m S 6.3 1.2 39:57.82 java
443322 idam 20 0 6144m 764m 14m S 6.0 1.2 39:40.54 java
443323 idam 20 0 6144m 764m 14m S 6.0 1.2 40:57.23 java
443327 idam 20 0 6144m 764m 14m S 6.0 1.2 41:03.17 java
443331 idam 20 0 6144m 764m 14m S 6.0 1.2 39:28.39 java
443332 idam 20 0 6144m 764m 14m S 6.0 1.2 39:34.49 java
443333 idam 20 0 6144m 764m 14m S 6.0 1.2 41:05.91 java
443334 idam 20 0 6144m 764m 14m S 6.0 1.2 41:05.80 java
443339 idam 20 0 6144m 764m 14m S 6.0 1.2 70:11.28 java
443324 idam 20 0 6144m 764m 14m S 5.7 1.2 43:53.77 java
443329 idam 20 0 6144m 764m 14m S 5.7 1.2 42:32.37 java
443340 idam 20 0 6144m 764m 14m S 1.0 1.2 451:47.04 java
443362 idam 20 0 6144m 764m 14m S 0.3 1.2 0:20.09 <beats
443306 idam 20 0 6144m 764m 14m S 0.0 1.2 0:00.01 java
443321 idam 20 0 6144m 764m 14m S 0.0 1.2 0:17.48 LogStash::Runne
443341 idam 20 0 6144m 764m 14m S 0.0 1.2 0:27.41 java
443342 idam 20 0 6144m 764m 14m S 0.0 1.2 0:27.99 java
443343 idam 20 0 6144m 764m 14m S 0.0 1.2 0:01.28 java
443344 idam 20 0 6144m 764m 14m S 0.0 1.2 0:00.00 java
443345 idam 20 0 6144m 764m 14m S 0.0 1.2 0:07.00 java
443346 idam 20 0 6144m 764m 14m S 0.0 1.2 0:07.33 java
443347 idam 20 0 6144m 764m 14m S 0.0 1.2 0:06.73 java
443348 idam 20 0 6144m 764m 14m S 0.0 1.2 0:06.62 java
443349 idam 20 0 6144m 764m 14m S 0.0 1.2 0:07.55 java
443350 idam 20 0 6144m 764m 14m S 0.0 1.2 0:06.95 java
443351 idam 20 0 6144m 764m 14m S 0.0 1.2 0:07.63 java
443352 idam 20 0 6144m 764m 14m S 0.0 1.2 0:07.71 java
443353 idam 20 0 6144m 764m 14m S 0.0 1.2 0:02.88 java
443354 idam 20 0 6144m 764m 14m S 0.0 1.2 0:02.74 java
443355 idam 20 0 6144m 764m 14m S 0.0 1.2 0:03.01 java
443356 idam 20 0 6144m 764m 14m S 0.0 1.2 0:02.87 java
443357 idam 20 0 6144m 764m 14m S 0.0 1.2 0:00.00 java
443358 idam 20 0 6144m 764m 14m S 0.0 1.2 0:50.27 java
443360 idam 20 0 6144m 764m 14m S 0.0 1.2 0:00.00 java
443361 idam 20 0 6144m 764m 14m S 0.0 1.2 0:12.20 LogStash::Runne
443363 idam 20 0 6144m 764m 14m S 0.0 1.2 73:54.21 >output
443364 idam 20 0 6144m 764m 14m S 0.0 1.2 21:42.55 <beats
443620 idam 20 0 6144m 764m 14m S 0.0 1.2 16:50.18 <beats
443735 idam 20 0 6144m 764m 14m S 0.0 1.2 16:09.65 <beats
443737 idam 20 0 6144m 764m 14m S 0.0 1.2 17:41.94 <beats
and there are still ESTABLISHED connections to the port logstash is listening on.
So the question is "what is the Logstash doing now?"
I didn't kill the process yet, so if you want some thread dump or anything - let me know.