0

I tried to separate the webserver and mysql server. MySQL server = 16GB RAM and the config of Innodb_buffer_pool_size = 10GB. And my Web server = 4GB RAM

My website connect to my database server using remote access with IP assigned. When I running a website it feels very slowly and then web goes down with the log "Cannot allocate memory for the buffer pool"

Does the webserver need more RAM for Innodb_buffer_pool_size too? Because what I know is that the webserver only run httpd not mysqld. And mysqld handled by remote mysql server.

In my case the web server still need to increase size for Innodb_buffer_pool_size.

Already add "skip-name-resolve" but no luck.

Is anyone here encounter same issue with me?

0

"Separate" -- meaning they are on 2 different servers?

If so, then 10GB for the buffer_pool should be fine for a mysql-only server with 16GB of RAM.

If you have both on the same server, set the buffer_pool to

70% * (16G - (ram needed for web server))

down with the log "Cannot allocate memory for the buffer pool"

Something is hogging memory. It could be:

  • Other processes
  • Settings in mysql that are too high. Did you change some other settings?

Or are you getting that error on the separate web server? If so, then you have MySQL there!

  • Yes, my Web Server (4GB RAM) already installed Cpanel, so apache and mysql are included. And my Database Server (16GB RAM) only installed MySQL. But I'm only running service apache (httpd) on my Web Server. My database website connect to remote MySQL server. So I think I dont need more RAM to handle mysql on my web server (4GB RAM). I think config Innodb_buffer_pool_size in my MySQL Server is fine. The problem is in my log WebServer I still must to increase Innodb_buffer_pool_size. Not in MySQL Server. – Rendy Proklamanta Dec 14 '18 at 13:33
  • "Cannot allocate" comes from setting the configuration values too high. The buffer_pool is a cache, so there is no requirement to increase it as the dataset increases. And, in some applications, there is no need to. For example, if you only query "today's" data, it does not matter if there is a terabyte of old data sitting on disk. If you are repeatedly scanning a growing table, we can discuss remedies in another Q&A. – Rick James Dec 14 '18 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.