日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Fatal error: cannot allocate memory for the buffer pool

發布時間:2025/7/25 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Fatal error: cannot allocate memory for the buffer pool 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

mysql有時候會被系統kill掉,原因是內存不夠了,一般都是Ubuntu出現的,因為Ubuntu吃內存,你們又給的不多。。

咋解決呢?

重啟服務器是可以的,起碼暫時可以了,

可以考慮加內存,或者增加swap。

如果給Ubuntu增加swap請見下文:

轉載自:https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04

?

About Linux Swapping


Linux RAM is composed of chunks of memory called pages. To free up pages of RAM, a “linux swap” can occur and a page of memory is copied from the RAM to preconfigured space on the hard disk. Linux swaps allow a system to harness more memory than was originally physically available.?

However, swapping does have disadvantages. Because hard disks have a much slower memory than RAM, virtual private server performance may slow down considerably. Additionally, swap thrashing can begin to take place if the system gets swamped from too many files being swapped in and out.

Check for Swap Space


Before we proceed to set up a swap file, we need to check if any swap files have been enabled on the VPS by looking at the summary of swap usage.

sudo swapon -s


An empty list will confirm that you have no swap files enabled:

Filename Type Size Used Priority

Check the File System


After we know that we do not have a swap file enabled on the virtual server, we can check how much space we have on the server with the?df?command. The swap file will take 256MB— since we are only using up about 8% of the /dev/sda, we can proceed.

df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda 20907056 1437188 18421292 8% / udev 121588 4 121584 1% /dev tmpfs 49752 208 49544 1% /run none 5120 0 5120 0% /run/lock none 124372 0 124372 0% /run/shm

Create and Enable the Swap File


Now it’s time to create the swap file itself using the dd command :

sudo dd if=/dev/zero of=/swapfile bs=1024 count=256k


“of=/swapfile” designates the file’s name. In this case the name is swapfile.?

Subsequently we are going to prepare the swap file by creating a linux swap area:

sudo mkswap /swapfile


The results display:

Setting up swapspace version 1, size = 262140 KiB no label, UUID=103c4545-5fc5-47f3-a8b3-dfbdb64fd7eb


Finish up by activating the swap file:

sudo swapon /swapfile


You will then be able to see the new swap file when you view the swap summary.

swapon -s Filename Type Size Used Priority /swapfile file 262140 0 -1


This file will last on the virtual private server until the machine reboots. You can ensure that the swap is permanent by adding it to the fstab file.

Open up the file:

sudo nano /etc/fstab


Paste in the following line:

/swapfile none swap sw 0 0



Swappiness in the file should be set to 10. Skipping this step may cause both poor performance, whereas setting it to 10 will cause swap to act as an emergency buffer, preventing out-of-memory crashes.

You can do this with the following commands:

echo 10 | sudo tee /proc/sys/vm/swappiness echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf


To prevent the file from being world-readable, you should set up the correct permissions on the swap file:

sudo chown root:root /swapfile sudo chmod 0600 /swapfile

轉載于:https://www.cnblogs.com/maseng/p/3741043.html

總結

以上是生活随笔為你收集整理的Fatal error: cannot allocate memory for the buffer pool的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 中文字幕人妻一区二区三区视频 | 精品久久影院 | 一级aaa毛片 | 中文字幕理伦片免费看 | 久久婷婷影视 | 国模吧无码一区二区三区 | 精品一区二区久久久久久久网站 | 中文字幕在线视频免费观看 | 国产精品探花一区二区三区 | 日韩精品――色哟哟 | 亚洲GV成人无码久久精品 | 四季av综合网站 | 国产网站免费在线观看 | 麻豆一二三区 | 麻豆蜜臀 | 日本美女黄视频 | 中文久久精品 | 日韩欧美一区二区在线观看 | 亚洲国产精品免费在线观看 | 久久久久久免费精品 | 欧美精品一区二区三区四区五区 | 一区二区自拍偷拍 | 在线观看va | 国产99久久九九精品无码免费 | 国产精品成人网站 | 亚洲天堂中文字幕 | xxxxx69| 亚洲一区二区三区免费观看 | 又大又长粗又爽又黄少妇视频 | 天天色小说 | 在线免费观看日韩av | 日本熟妇色xxxxx日本免费看 | 侵犯女教师一区二区三区 | 最近中文字幕在线中文视频 | 黄色自拍网站 | 中文字幕免费在线视频 | 少妇喷水在线观看 | 狠狠操在线播放 | 奇米影视在线观看 | 日本视频免费在线播放 | 91九色porny视频| 2025国产精品 | 国产第一精品视频 | 精品香蕉视频 | 无码一区二区三区在线 | 人人看人人澡 | 日本精品久久久久 | 伊人色影院| 无码人妻一区二区三区免费n鬼沢 | 欧类av怡春院 | 国产乱色精品成人免费视频 | 东京热毛片 | 少妇熟女高潮流白浆 | 麻豆视频在线看 | 性猛交ⅹxxx富婆视频 | 久久久久久久毛片 | 久久露脸国语精品国产91 | 日本黄色xxxx| 欧美乱妇在线观看 | 日本女优中文字幕 | 日本黄色www | 国产在线18| 一级做a爱片 | 欧美一区二区三区久久综合 | 91麻豆一区二区 | 欧美一区二 | 激情视频区 | 日韩免费观看一区二区 | 婷婷综合社区 | 亚洲av无码不卡一区二区三区 | 久久亚洲区 | 色悠悠在线视频 | 青青草综合在线 | av无码一区二区三区 | 成人在线国产精品 | 亚洲熟妇无码av在线播放 | 亚洲青草视频 | 激情图片在线视频 | 台湾性生生活1 | 99国产视频在线 | 亚洲色图另类图片 | 污视频免费在线观看网站 | 夜夜春视频 | 国语对白一区二区 | 国产中文一区二区三区 | 欧美色图30p| 日韩一级黄色大片 | 高清中文字幕mv的电影 | 无遮挡国产 | 国产高清视频在线观看 | 国产1区二区 | 久久久精品蜜桃 | 色666| 欧美大肥婆大肥bbbbb | 欧美久久久精品 | 色五五月| 国产极品在线观看 | 中文字幕一区二区三区5566 | 欧美性天天影院 |