Skip to content

Commit 3febcc2

Browse files
authored
docs: Update how-to-identify-and-stop-long-running-processes.md
- Fixed typo in meta title - Added redirect_from path - Corrected syntax highlighting for code blocks
1 parent 7205824 commit 3febcc2

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

docs/troubleshooting/performance/how-to-identify-and-stop-long-running-processes.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ myst:
33
html_meta:
44
description: Learn how to quickly identify and stop long-running processes on
55
Hypernode with our easy-to-follow guide.
6-
title: How to idfentify and stop long running processes? | Hypernode
6+
title: How to identify and stop long running processes? | Hypernode
77
redirect_from:
88
- /en/troubleshooting/performance/how-to-identify-and-stop-long-running-processes/
9+
- /knowledgebase/identifying-and-stopping-long-running-processes/
910
---
1011

1112
<!-- source: https://support.hypernode.com/en/troubleshooting/performance/how-to-identify-and-stop-long-running-processes/ -->
@@ -18,29 +19,29 @@ Long running processes can indicate that the the site might benefit from an inde
1819

1920
To identify long running SQL processes you can use the tool `Mytop`. `Mytop` displays the running mysql processes in real time. To identify a long running SQL process with `Mytop`, you can run the following command to inspect the duration of your SQL processes:
2021

21-
```nginx
22+
```bash
2223
mytop
2324
```
2425

2526
The output will look like something like this:
2627

2728
![](_res/Mqt7Zm-GL7QmGG-mXSb9kQdGcaL1NA6UQA.png)Alternatively you can request the processlist from MySQL yourself by using the commands:
2829

29-
```nginx
30+
```bash
3031
mysql -Be 'SHOW FULL PROCESSLIST;'
3132
```
3233

3334
The outcome will look like this (screenshot includes the commands that been used):![](_res/QTQF1Z-Xu6Wz4uJMchJ_UE2TXNpyl4x1AA.png)*To make your life easier, we created an alias myprocs to watch the processlist while devving. In some cases using this alias instead of `mytop` will provide more accurate information.*
3435

3536
Once you’ve identified the long running process(es) you can kill them with the command `kill` and it’s ID number. The example below shows how we kill the longest running query:
3637

37-
```nginx
38+
```bash
3839
kill 47630
3940
```
4041

4142
If that doesn’t work, there is a more aggressive method of killing using the `-9` flag. This instructs the kernel to kill the process without running any cleanup handling and instantly stops a process:
4243

43-
```nginx
44+
```bash
4445
kill -9 47630
4546
```
4647

@@ -52,7 +53,7 @@ And the outcome will be:
5253

5354
To identify a long running PHP process you can run the following command to inspect the duration of your FPM processes in real time:
5455

55-
```nginx
56+
```bash
5657
livefpm
5758
```
5859

@@ -69,7 +70,7 @@ By typing several ID numbers after the kill command you can kill multiple long r
6970

7071
To find long running shell processes you can use this command:
7172

72-
```nginx
73+
```bash
7374
ps --sort etime -A -o etime,pid,user,args | grep php | grep -vE 'php-fpm|\-\-mode daemon|grep'
7475
```
7576

@@ -78,6 +79,6 @@ The output will look something like this:
7879

7980
Like SQL and FPM processes you can kill long running SSH processes with the command `kill` and the process ID:
8081

81-
```nginx
82+
```bash
8283
kill -9 22123
8384
```

0 commit comments

Comments
 (0)