Score:0

Cannot lower mysql threads

it flag

I am running a LAMP stack on my ubuntu server. But it keeps running out of memory because of mysql.

It spawns 38 processes. I am failing to lower the amount of threads. I tried setting the max_connections to 4 and the thread_cache_size to 2, but still it spawns the 38 threads: ProccessList

The mysql status does show only 2 worker threads are spawned:

+------------------------------+-------+
| Variable_name                | Value |
+------------------------------+-------+
| Delayed_insert_threads       | 0     |
| Mysqlx_worker_threads        | 2     |
| Mysqlx_worker_threads_active | 0     |
| Slow_launch_threads          | 0     |
| Threads_cached               | 0     |
| Threads_connected            | 1     |
| Threads_created              | 1     |
| Threads_running              | 2     |
+------------------------------+-------+

Any suggestions to lower the amount of threads?

in flag
Threads are rarely the issue when you’re running out of memory with MySQL. What is the exact error message you see in `/var/log/mysql/error.log` when the system runs out of memory?
Sobraj avatar
it flag
There is nothing in the error file. The system just stops responding and I have to reboot the entire system.
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.