My Ubuntu 16.04 Install with WordPress keeps opening apache2 processes, eating memory [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












After a clean server reboot, the server will be okay. Upon visiting the website and clicking around on some links, apache2 processes are created but never terminated and it constantly takes up more and more memory until the server essentially crashes. The only way to fix this is to either restart the apache2 service in order to terminate all of the processes, or by rebooting the server again.



My attempts have included restoring to default WordPress theme and disabling all plugins, then browsing the website again, although it seems the issue persists after the fact. I've also attempted to make minor configurations to apache.conf as well as the php.ini file.



I'm rather lost at the moment and have done research in order to try and find out what the issue is but have only gone down dead ends.



My question is, why are apache2 and mysqld taking up so much memory and prevent them from doing so in order to stop my server from crashing?



Below is an image of the currently running processes, showing apache eating up memory and spawning several apache2 processes.



enter image description here



Apache Error Logs:



[Fri Aug 10 18:15:48.070518 2018] [mpm_prefork:notice] [pid 7451] AH00169: caught SIGTERM, shutting down
[Fri Aug 10 18:15:48.948516 2018] [ssl:warn] [pid 11222] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 10 18:15:49.143749 2018] [ssl:warn] [pid 11223] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 10 18:15:49.154471 2018] [mpm_prefork:notice] [pid 11223] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Fri Aug 10 18:15:49.154530 2018] [core:notice] [pid 11223] AH00094: Command line: '/usr/sbin/apache2'

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory

(Repeat . . . )


Apache Access Logs (bots may be causing it?):



5.9.61.232 - - [10/Aug/2018:18:40:11 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_orderby=rating&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:13 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:13 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:23 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:23 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:29 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=date HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:29 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:34 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:34 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=default HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:41 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:41 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=name HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:49 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:49 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=rating HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:55 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=date HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:54 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:01 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:01 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=default HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:10 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=name HTTP/1.1" 200 436 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:12 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=popularity HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:10 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:14 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:14 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=price HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:21 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=rating HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:21 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:30 +0000] "GET /product-category/personalized-jewelry/page/2/?prod&product_count=16&product_order&product_orderby=name HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:30 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:36 +0000] "GET /product-category/personalized-jewelry/page/2/?prod&product_count=16&product_order&product_orderby=price HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:36 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:43 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:43 +0000] "GET /product-category/personalized-jewelry/page/2/?prod&product_count=16&product_order&product_orderby=rating HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:51 +0000] "GET /product-category/personalized-jewelry/page/2/?product_count=16&product_orderby=date&product_view&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:51 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:02 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:02 +0000] "GET /product-category/personalized-jewelry/page/2/?product_count=16&product_orderby=default&product_view&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:10 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:10 +0000] "GET /product-category/personalized-jewelry/page/2/?product_count=16&product_orderby=popularity&product_view&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:20 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:20 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=date&product_view&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:26 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=default&product_v HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:26 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:35 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=price&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:35 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=rating&product_v HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:41 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=rating&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:41 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=rating&product_v&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:49 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=rating&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:49 +0000] "GET /product-category/personalized-jewelry/page/5/?prod&product_count=16&product_order=desc&product_orderby=date HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:58 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_view=grid&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:58 +0000] "GET /product-category/personalized-jewelry/page/5/?prod&product_count=16&product_order=desc&product_orderby=default HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"









share|improve this question















closed as too broad by Rui F Ribeiro, G-Man, schily, Archemar, Isaac Aug 15 at 7:55


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • More interesting than an image of htop at one instant in time would be some excerpts of the apache logs.
    – DopeGhoti
    Aug 10 at 18:35










  • I've added the Apache logs to my post.
    – Rob Calaceto
    Aug 10 at 18:41










  • Turn on swap. Please understand that you need swap, even on a machine with much more RAM than your current one.
    – peterh
    Aug 15 at 20:58











  • Swap was not enabled on this server instance, although after enabling the swap file the issue persists.
    – Rob Calaceto
    Aug 16 at 18:36














up vote
0
down vote

favorite












After a clean server reboot, the server will be okay. Upon visiting the website and clicking around on some links, apache2 processes are created but never terminated and it constantly takes up more and more memory until the server essentially crashes. The only way to fix this is to either restart the apache2 service in order to terminate all of the processes, or by rebooting the server again.



My attempts have included restoring to default WordPress theme and disabling all plugins, then browsing the website again, although it seems the issue persists after the fact. I've also attempted to make minor configurations to apache.conf as well as the php.ini file.



I'm rather lost at the moment and have done research in order to try and find out what the issue is but have only gone down dead ends.



My question is, why are apache2 and mysqld taking up so much memory and prevent them from doing so in order to stop my server from crashing?



Below is an image of the currently running processes, showing apache eating up memory and spawning several apache2 processes.



enter image description here



Apache Error Logs:



[Fri Aug 10 18:15:48.070518 2018] [mpm_prefork:notice] [pid 7451] AH00169: caught SIGTERM, shutting down
[Fri Aug 10 18:15:48.948516 2018] [ssl:warn] [pid 11222] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 10 18:15:49.143749 2018] [ssl:warn] [pid 11223] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 10 18:15:49.154471 2018] [mpm_prefork:notice] [pid 11223] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Fri Aug 10 18:15:49.154530 2018] [core:notice] [pid 11223] AH00094: Command line: '/usr/sbin/apache2'

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory

(Repeat . . . )


Apache Access Logs (bots may be causing it?):



5.9.61.232 - - [10/Aug/2018:18:40:11 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_orderby=rating&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:13 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:13 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:23 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:23 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:29 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=date HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:29 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:34 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:34 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=default HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:41 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:41 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=name HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:49 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:49 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=rating HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:55 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=date HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:54 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:01 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:01 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=default HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:10 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=name HTTP/1.1" 200 436 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:12 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=popularity HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:10 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:14 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:14 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=price HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:21 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=rating HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:21 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:30 +0000] "GET /product-category/personalized-jewelry/page/2/?prod&product_count=16&product_order&product_orderby=name HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:30 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:36 +0000] "GET /product-category/personalized-jewelry/page/2/?prod&product_count=16&product_order&product_orderby=price HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:36 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:43 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:43 +0000] "GET /product-category/personalized-jewelry/page/2/?prod&product_count=16&product_order&product_orderby=rating HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:51 +0000] "GET /product-category/personalized-jewelry/page/2/?product_count=16&product_orderby=date&product_view&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:51 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:02 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:02 +0000] "GET /product-category/personalized-jewelry/page/2/?product_count=16&product_orderby=default&product_view&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:10 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:10 +0000] "GET /product-category/personalized-jewelry/page/2/?product_count=16&product_orderby=popularity&product_view&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:20 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:20 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=date&product_view&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:26 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=default&product_v HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:26 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:35 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=price&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:35 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=rating&product_v HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:41 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=rating&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:41 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=rating&product_v&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:49 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=rating&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:49 +0000] "GET /product-category/personalized-jewelry/page/5/?prod&product_count=16&product_order=desc&product_orderby=date HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:58 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_view=grid&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:58 +0000] "GET /product-category/personalized-jewelry/page/5/?prod&product_count=16&product_order=desc&product_orderby=default HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"









share|improve this question















closed as too broad by Rui F Ribeiro, G-Man, schily, Archemar, Isaac Aug 15 at 7:55


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • More interesting than an image of htop at one instant in time would be some excerpts of the apache logs.
    – DopeGhoti
    Aug 10 at 18:35










  • I've added the Apache logs to my post.
    – Rob Calaceto
    Aug 10 at 18:41










  • Turn on swap. Please understand that you need swap, even on a machine with much more RAM than your current one.
    – peterh
    Aug 15 at 20:58











  • Swap was not enabled on this server instance, although after enabling the swap file the issue persists.
    – Rob Calaceto
    Aug 16 at 18:36












up vote
0
down vote

favorite









up vote
0
down vote

favorite











After a clean server reboot, the server will be okay. Upon visiting the website and clicking around on some links, apache2 processes are created but never terminated and it constantly takes up more and more memory until the server essentially crashes. The only way to fix this is to either restart the apache2 service in order to terminate all of the processes, or by rebooting the server again.



My attempts have included restoring to default WordPress theme and disabling all plugins, then browsing the website again, although it seems the issue persists after the fact. I've also attempted to make minor configurations to apache.conf as well as the php.ini file.



I'm rather lost at the moment and have done research in order to try and find out what the issue is but have only gone down dead ends.



My question is, why are apache2 and mysqld taking up so much memory and prevent them from doing so in order to stop my server from crashing?



Below is an image of the currently running processes, showing apache eating up memory and spawning several apache2 processes.



enter image description here



Apache Error Logs:



[Fri Aug 10 18:15:48.070518 2018] [mpm_prefork:notice] [pid 7451] AH00169: caught SIGTERM, shutting down
[Fri Aug 10 18:15:48.948516 2018] [ssl:warn] [pid 11222] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 10 18:15:49.143749 2018] [ssl:warn] [pid 11223] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 10 18:15:49.154471 2018] [mpm_prefork:notice] [pid 11223] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Fri Aug 10 18:15:49.154530 2018] [core:notice] [pid 11223] AH00094: Command line: '/usr/sbin/apache2'

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory

(Repeat . . . )


Apache Access Logs (bots may be causing it?):



5.9.61.232 - - [10/Aug/2018:18:40:11 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_orderby=rating&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:13 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:13 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:23 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:23 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:29 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=date HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:29 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:34 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:34 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=default HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:41 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:41 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=name HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:49 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:49 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=rating HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:55 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=date HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:54 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:01 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:01 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=default HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:10 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=name HTTP/1.1" 200 436 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:12 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=popularity HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:10 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:14 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:14 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=price HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:21 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=rating HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:21 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:30 +0000] "GET /product-category/personalized-jewelry/page/2/?prod&product_count=16&product_order&product_orderby=name HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:30 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:36 +0000] "GET /product-category/personalized-jewelry/page/2/?prod&product_count=16&product_order&product_orderby=price HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:36 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:43 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:43 +0000] "GET /product-category/personalized-jewelry/page/2/?prod&product_count=16&product_order&product_orderby=rating HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:51 +0000] "GET /product-category/personalized-jewelry/page/2/?product_count=16&product_orderby=date&product_view&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:51 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:02 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:02 +0000] "GET /product-category/personalized-jewelry/page/2/?product_count=16&product_orderby=default&product_view&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:10 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:10 +0000] "GET /product-category/personalized-jewelry/page/2/?product_count=16&product_orderby=popularity&product_view&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:20 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:20 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=date&product_view&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:26 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=default&product_v HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:26 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:35 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=price&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:35 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=rating&product_v HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:41 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=rating&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:41 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=rating&product_v&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:49 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=rating&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:49 +0000] "GET /product-category/personalized-jewelry/page/5/?prod&product_count=16&product_order=desc&product_orderby=date HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:58 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_view=grid&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:58 +0000] "GET /product-category/personalized-jewelry/page/5/?prod&product_count=16&product_order=desc&product_orderby=default HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"









share|improve this question















After a clean server reboot, the server will be okay. Upon visiting the website and clicking around on some links, apache2 processes are created but never terminated and it constantly takes up more and more memory until the server essentially crashes. The only way to fix this is to either restart the apache2 service in order to terminate all of the processes, or by rebooting the server again.



My attempts have included restoring to default WordPress theme and disabling all plugins, then browsing the website again, although it seems the issue persists after the fact. I've also attempted to make minor configurations to apache.conf as well as the php.ini file.



I'm rather lost at the moment and have done research in order to try and find out what the issue is but have only gone down dead ends.



My question is, why are apache2 and mysqld taking up so much memory and prevent them from doing so in order to stop my server from crashing?



Below is an image of the currently running processes, showing apache eating up memory and spawning several apache2 processes.



enter image description here



Apache Error Logs:



[Fri Aug 10 18:15:48.070518 2018] [mpm_prefork:notice] [pid 7451] AH00169: caught SIGTERM, shutting down
[Fri Aug 10 18:15:48.948516 2018] [ssl:warn] [pid 11222] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 10 18:15:49.143749 2018] [ssl:warn] [pid 11223] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Fri Aug 10 18:15:49.154471 2018] [mpm_prefork:notice] [pid 11223] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Fri Aug 10 18:15:49.154530 2018] [core:notice] [pid 11223] AH00094: Command line: '/usr/sbin/apache2'

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory

(Repeat . . . )


Apache Access Logs (bots may be causing it?):



5.9.61.232 - - [10/Aug/2018:18:40:11 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_orderby=rating&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:13 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:13 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:23 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:23 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:29 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=date HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:29 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:34 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=date&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:34 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=default HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:41 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:41 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=name HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:49 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:49 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=grid&product_orderby=rating HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:40:55 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=date HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:40:54 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:01 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:01 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=default HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:10 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=name HTTP/1.1" 200 436 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:12 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=popularity HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:10 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=default&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:14 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:14 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=price HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:21 +0000] "GET /product-category/personalized-jewelry/page/10/?produ&product_count=3&product_view=list&product_orderby=rating HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:21 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:30 +0000] "GET /product-category/personalized-jewelry/page/2/?prod&product_count=16&product_order&product_orderby=name HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:30 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:36 +0000] "GET /product-category/personalized-jewelry/page/2/?prod&product_count=16&product_order&product_orderby=price HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:36 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:43 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=name&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:43 +0000] "GET /product-category/personalized-jewelry/page/2/?prod&product_count=16&product_order&product_orderby=rating HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:41:51 +0000] "GET /product-category/personalized-jewelry/page/2/?product_count=16&product_orderby=date&product_view&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:41:51 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:02 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:02 +0000] "GET /product-category/personalized-jewelry/page/2/?product_count=16&product_orderby=default&product_view&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:10 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:10 +0000] "GET /product-category/personalized-jewelry/page/2/?product_count=16&product_orderby=popularity&product_view&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:20 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:20 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=date&product_view&product_order=asc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:26 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=default&product_v HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:26 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=popularity&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:35 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=price&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:35 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=rating&product_v HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:41 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=rating&product_view=grid HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:41 +0000] "GET /product-category/personalized-jewelry/page/3/?product_count=16&product_orderby=rating&product_v&product_order=desc HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:49 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_orderby=rating&product_view=list HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:49 +0000] "GET /product-category/personalized-jewelry/page/5/?prod&product_count=16&product_order=desc&product_orderby=date HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.141.8 - - [10/Aug/2018:18:42:58 +0000] "GET /product-category/personalized-jewelry/page/7/?produ=&product_orderb=&product_view=grid&product_count=16 HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"
5.9.61.232 - - [10/Aug/2018:18:42:58 +0000] "GET /product-category/personalized-jewelry/page/5/?prod&product_count=16&product_order=desc&product_orderby=default HTTP/1.1" 200 374 "-" "Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/)"






ubuntu apache-httpd wordpress






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 15 at 19:00

























asked Aug 10 at 18:24









Rob Calaceto

111




111




closed as too broad by Rui F Ribeiro, G-Man, schily, Archemar, Isaac Aug 15 at 7:55


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as too broad by Rui F Ribeiro, G-Man, schily, Archemar, Isaac Aug 15 at 7:55


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.













  • More interesting than an image of htop at one instant in time would be some excerpts of the apache logs.
    – DopeGhoti
    Aug 10 at 18:35










  • I've added the Apache logs to my post.
    – Rob Calaceto
    Aug 10 at 18:41










  • Turn on swap. Please understand that you need swap, even on a machine with much more RAM than your current one.
    – peterh
    Aug 15 at 20:58











  • Swap was not enabled on this server instance, although after enabling the swap file the issue persists.
    – Rob Calaceto
    Aug 16 at 18:36
















  • More interesting than an image of htop at one instant in time would be some excerpts of the apache logs.
    – DopeGhoti
    Aug 10 at 18:35










  • I've added the Apache logs to my post.
    – Rob Calaceto
    Aug 10 at 18:41










  • Turn on swap. Please understand that you need swap, even on a machine with much more RAM than your current one.
    – peterh
    Aug 15 at 20:58











  • Swap was not enabled on this server instance, although after enabling the swap file the issue persists.
    – Rob Calaceto
    Aug 16 at 18:36















More interesting than an image of htop at one instant in time would be some excerpts of the apache logs.
– DopeGhoti
Aug 10 at 18:35




More interesting than an image of htop at one instant in time would be some excerpts of the apache logs.
– DopeGhoti
Aug 10 at 18:35












I've added the Apache logs to my post.
– Rob Calaceto
Aug 10 at 18:41




I've added the Apache logs to my post.
– Rob Calaceto
Aug 10 at 18:41












Turn on swap. Please understand that you need swap, even on a machine with much more RAM than your current one.
– peterh
Aug 15 at 20:58





Turn on swap. Please understand that you need swap, even on a machine with much more RAM than your current one.
– peterh
Aug 15 at 20:58













Swap was not enabled on this server instance, although after enabling the swap file the issue persists.
– Rob Calaceto
Aug 16 at 18:36




Swap was not enabled on this server instance, although after enabling the swap file the issue persists.
– Rob Calaceto
Aug 16 at 18:36










2 Answers
2






active

oldest

votes

















up vote
1
down vote













It looks like your site is being hit by a particularly aggressive web crawler. You might look to see if you can exclude or rate-limit your site from that bot, or block it at the firewall if it's not a bot you particularly care about. Alternatively, you could add a robots.txt file to your site to discourage such bots.






share|improve this answer



























    up vote
    0
    down vote













    From the htop image I think mysqld is eating more memory than apache. I'm trying to provide some general solutions that may be helpful.



    1. Try tweaking mysqld parameters in /etc/my.cnf. Please google for how to reduce mysql memory consumption.


    2. I think memory footprint of apache/nginx + php-fpm is lesser than if you handle php directly with apache. In both cases, you can control the maximum number of php thread, memory per thread etc. Please do some fine tuning there.


    3. Most importantly analyze mysqld, apache2 etc log files. Read man pages for default log file locations and find for any error.


    Hope, that's help.






    share|improve this answer



























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote













      It looks like your site is being hit by a particularly aggressive web crawler. You might look to see if you can exclude or rate-limit your site from that bot, or block it at the firewall if it's not a bot you particularly care about. Alternatively, you could add a robots.txt file to your site to discourage such bots.






      share|improve this answer
























        up vote
        1
        down vote













        It looks like your site is being hit by a particularly aggressive web crawler. You might look to see if you can exclude or rate-limit your site from that bot, or block it at the firewall if it's not a bot you particularly care about. Alternatively, you could add a robots.txt file to your site to discourage such bots.






        share|improve this answer






















          up vote
          1
          down vote










          up vote
          1
          down vote









          It looks like your site is being hit by a particularly aggressive web crawler. You might look to see if you can exclude or rate-limit your site from that bot, or block it at the firewall if it's not a bot you particularly care about. Alternatively, you could add a robots.txt file to your site to discourage such bots.






          share|improve this answer












          It looks like your site is being hit by a particularly aggressive web crawler. You might look to see if you can exclude or rate-limit your site from that bot, or block it at the firewall if it's not a bot you particularly care about. Alternatively, you could add a robots.txt file to your site to discourage such bots.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 10 at 19:29









          DopeGhoti

          41k55080




          41k55080






















              up vote
              0
              down vote













              From the htop image I think mysqld is eating more memory than apache. I'm trying to provide some general solutions that may be helpful.



              1. Try tweaking mysqld parameters in /etc/my.cnf. Please google for how to reduce mysql memory consumption.


              2. I think memory footprint of apache/nginx + php-fpm is lesser than if you handle php directly with apache. In both cases, you can control the maximum number of php thread, memory per thread etc. Please do some fine tuning there.


              3. Most importantly analyze mysqld, apache2 etc log files. Read man pages for default log file locations and find for any error.


              Hope, that's help.






              share|improve this answer
























                up vote
                0
                down vote













                From the htop image I think mysqld is eating more memory than apache. I'm trying to provide some general solutions that may be helpful.



                1. Try tweaking mysqld parameters in /etc/my.cnf. Please google for how to reduce mysql memory consumption.


                2. I think memory footprint of apache/nginx + php-fpm is lesser than if you handle php directly with apache. In both cases, you can control the maximum number of php thread, memory per thread etc. Please do some fine tuning there.


                3. Most importantly analyze mysqld, apache2 etc log files. Read man pages for default log file locations and find for any error.


                Hope, that's help.






                share|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  From the htop image I think mysqld is eating more memory than apache. I'm trying to provide some general solutions that may be helpful.



                  1. Try tweaking mysqld parameters in /etc/my.cnf. Please google for how to reduce mysql memory consumption.


                  2. I think memory footprint of apache/nginx + php-fpm is lesser than if you handle php directly with apache. In both cases, you can control the maximum number of php thread, memory per thread etc. Please do some fine tuning there.


                  3. Most importantly analyze mysqld, apache2 etc log files. Read man pages for default log file locations and find for any error.


                  Hope, that's help.






                  share|improve this answer












                  From the htop image I think mysqld is eating more memory than apache. I'm trying to provide some general solutions that may be helpful.



                  1. Try tweaking mysqld parameters in /etc/my.cnf. Please google for how to reduce mysql memory consumption.


                  2. I think memory footprint of apache/nginx + php-fpm is lesser than if you handle php directly with apache. In both cases, you can control the maximum number of php thread, memory per thread etc. Please do some fine tuning there.


                  3. Most importantly analyze mysqld, apache2 etc log files. Read man pages for default log file locations and find for any error.


                  Hope, that's help.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 10 at 18:42









                  Abhik Bose

                  1,5341217




                  1,5341217












                      Popular posts from this blog

                      How to check contact read email or not when send email to Individual?

                      Displaying single band from multi-band raster using QGIS

                      How many registers does an x86_64 CPU actually have?