Score:1

Reached pm.max_children, High sockets allocated, No CPU usage

bh flag

The issue

I have a server that reaches pm.max_children (200) without spike in CPU usage. No network traffic (MB out / MB in) but extremely high number of socket allocated that do not get closed.

CPU: 16 Cores RAM: 64 GB

Pictures from my Prometheus monitor system.

Network Traffic, Look at the hole

enter image description here

No sockets get to TCP_tw point, They get stuck on TCP_alloc

enter image description here

Huge spike in socket use

enter image description here

To mitigate this problem i have to manually restart php-fpm. Otherwise its completely stuck for new connections.

CPU usage, It drops hard

enter image description here

Update

I suspect this is caused by tables getting locked in the database for an extended period of time which causes all connections trying to reach that data to wait and it ends up getting stuck in a big pile of connections.

I am currently setting up a Mysql exporter to see if i can find more.

Wilson Hauck avatar
jp flag
Please post your code that accomplishes 'Connect', 'Process', 'Close' sequence. We may spot something you have missed.
Wilson Hauck avatar
jp flag
Please post your php.ini configuration information.
Wilson Hauck avatar
jp flag
And post TEXT complete output of SHOW FULL PROCESSLIST; when this problem exists. Please post to justpaste.it and share the link.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.