Score:0

CPU Usage 98% /usr/sbin/mysqld and server down

bv flag

How to solve this issue. php codeigniter framwork Everyday our server goes down because of these issue. CPU usage 98 % Ram used 21 083 MB /usr/sbin/mysqld

ua flag
Find the slowest query; let's work on speeding it up. [_SlowLog_](http://mysql.rjweb.org/doc.php/mysql_analysis#slow_queries_and_slowlog)
Wilson Hauck avatar
jp flag
@majid-lateef Additional DB information request, please. OS, Version? RAM size, # cores, any SSD or NVME devices on MySQL Host server? Post TEXT data on justpaste.it and share the links. From your SSH login root, Text results of: A) SELECT COUNT(*), sum(data_length), sum(index_length), sum(data_free) FROM information_schema.tables; B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; E) STATUS; not SHOW STATUS, just STATUS; G) SHOW ENGINE INNODB STATUS; for server workload tuning analysis to provide suggestions.
Wilson Hauck avatar
jp flag
@majid-lateef Post TEXT data on justpaste.it and share the links. Additional very helpful OS information includes - please, htop 1st page, if available, TERMINATE, top -b -n 1 for most active apps, top -b -n 1 -H for details on your mysql threads memory and cpu usage, ulimit -a for list of limits, iostat -xm 5 3 for IOPS by device & core/cpu count, df -h for Used - Free space by device, df -i for inode info by device, free -h for Used - Free Mem: and Swap:, cat /proc/meminfo includes VMallocUused, for server workload tuning analysis to provide suggestions.
Wilson Hauck avatar
jp flag
@majid-lateef Posting TEXT of last 100 lines of an ERROR log after a crash could be very helpful to analyze difficulty you are facing. Welcome to ServerFault.com
Score:0
ua flag

If RAM is the problem: The quick fix is to lower innodb_buffer_pool_size in MySQL's config (possibly /etc/mysql/my.cnf). What is the current value? How much RAM on the server? Have you changed any my.cnf settings? (There may be others that are hurting.)

If CPU is the problem, locate the slowest query; let us help you optimize it. Cf: SlowLog

Score:0
ge flag

Well... I dont know much about ''code igniter''. But it look like a build up of connection maybe ???...

So, more details would be needed.

I would suggest you look at your ''php app'' logs as well as you MySQL logs to start with. And may be OS logs as well.

Also, there might be config suggestion for your DB settings from ''code igniter'' to optimize your performances.

Start with that I would say.

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.