Why am I constantly running out of memory?
I am running a VPS with 1024 mb ram that is hosting a single WordPress site. Lately I have been having a lot of database problems where WordPress is giving me "Error establishing a database connection". I can make the server crash just by crawling it with Screaming Frog SEO tool.
Sometimes the issue resolves itself, sometimes I need to manually restart MySQL, and other times I have to completely reboot the server.
I thought the error was related to MySQL itself, but after examining the various logs, it seems like my server is running out of memory and therefore simply killing MySQL.
I have been running "top" from command line, but can't figure out what's causing the problem. When accessing the server status in WHM I am using around 70 % of ram most of the time.
Would really appreciate some suggestions as how to proceed from here to figure out what is consuming my memory and causing the issues.
Thanks!
However - the daily proces logs mentions an average memory usage of 30 % most days.
-
I might have found out more about the issue. These are results from Mysqltuner: oi63.tinypic.com/2qvawci.jpg My settings from my.cnf: [mysqld] max_allowed_packet=268435456 open_files_limit=10000 innodb_buffer_pool_size = 128M innodb_log_file_size = 128M key_buffer_size = 64M innodb_file_per_table slow_query_log=1 slow_query_log_file="/var/log/slowqueries" long_query_time = 3 general_log=1 general_log_file="/var/lib/mysql/generalqueries" Should I simply lower my buffers? 0 -
Hi, I think free memory is not available on your server and due to that mysql process killed. You have to check memory status using command free -m Also, check logs in the file if showing process kill log tail -n 5000 /var/log/messages | grep kill the above command will show the kill process logs 0 -
Hello, The following thread is a good place to start when troubleshooting resource usage issues such as high CPU or memory usage: Troubleshooting high server loads on Linux servers Let us know if this helps. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments