Resource temporarily unavailable
資料庫版本:5.5.14
作業系統版本:contos 6.3
伺服器256G記憶體,安裝90個例項。透過指令碼啟動90個mysql資料庫例項,會有幾個例項無法啟動,程式啟動後直接被殺死。檢視mysql日誌如下:
140729 10:32:34 [ERROR] Can't create thread to kill server
140729 10:46:35 mysqld_safe Starting mysqld daemon with databases from /export/data/mysql/data3363
140729 10:46:36 InnoDB: The InnoDB memory heap is disabled
140729 10:46:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140729 10:46:36 InnoDB: Compressed tables use zlib 1.2.3
140729 10:46:36 InnoDB: Initializing buffer pool, size = 1.0G
140729 10:46:36 InnoDB: Completed initialization of buffer pool
140729 10:46:36 InnoDB: highest supported file format is Barracuda.
InnoDB: Error: pthread_create returned 11
140729 10:46:37 mysqld_safe mysqld from pid file /export/data/mysql/data3363/mysql.pid ended
140729 10:48:26 mysqld_safe Starting mysqld daemon with databases from /export/data/mysql/data3363
140729 10:48:26 [ERROR] setuid: Resource temporarily unavailable
140729 10:48:26 [ERROR] Aborting
主要問題是系統資源限制導致,可透過修改:
[root@yoon ~]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 2066313
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65535
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
可是ulimit修改後,不是永久性的。網上說在vi /etc/security/limits.conf下新增如下:
* soft nofile 65535
* hard nofile 65535
* soft nproc 65535
* hard nproc 65535
但是最終發現,也不是永久性的。而是要在此引數下修改,vi /etc/security/limits.d/90-nproc.conf
* soft nproc 65536
並手動ulimit-u 65535 即可。
作業系統版本:contos 6.3
伺服器256G記憶體,安裝90個例項。透過指令碼啟動90個mysql資料庫例項,會有幾個例項無法啟動,程式啟動後直接被殺死。檢視mysql日誌如下:
140729 10:32:34 [ERROR] Can't create thread to kill server
140729 10:46:35 mysqld_safe Starting mysqld daemon with databases from /export/data/mysql/data3363
140729 10:46:36 InnoDB: The InnoDB memory heap is disabled
140729 10:46:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140729 10:46:36 InnoDB: Compressed tables use zlib 1.2.3
140729 10:46:36 InnoDB: Initializing buffer pool, size = 1.0G
140729 10:46:36 InnoDB: Completed initialization of buffer pool
140729 10:46:36 InnoDB: highest supported file format is Barracuda.
InnoDB: Error: pthread_create returned 11
140729 10:46:37 mysqld_safe mysqld from pid file /export/data/mysql/data3363/mysql.pid ended
140729 10:48:26 mysqld_safe Starting mysqld daemon with databases from /export/data/mysql/data3363
140729 10:48:26 [ERROR] setuid: Resource temporarily unavailable
140729 10:48:26 [ERROR] Aborting
主要問題是系統資源限制導致,可透過修改:
[root@yoon ~]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 2066313
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65535
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
可是ulimit修改後,不是永久性的。網上說在vi /etc/security/limits.conf下新增如下:
* soft nofile 65535
* hard nofile 65535
* soft nproc 65535
* hard nproc 65535
但是最終發現,也不是永久性的。而是要在此引數下修改,vi /etc/security/limits.d/90-nproc.conf
* soft nproc 65536
並手動ulimit-u 65535 即可。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28939273/viewspace-1241366/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 錯誤:bash: fork: Resource temporarily unavailableAI
- ogg報錯error 11, Resource temporarily unavailableErrorAI
- 部署在IIS中服務出現異常 Failed to load resource: the server responded with a status of 503 (Service Unavailable)AIServer
- Laravel Resource Routes和API Resource Routes講解LaravelAPI
- Xcode啟動RN報錯"`fsevents` unavailable"XCodeAI
- 【譯】Resource Hints
- DRM - Dynamic Resource MasteringAST
- Android resource linking failedAndroidAI
- Metasploit resource命令技巧
- Spring系列.Resource介面Spring
- db2 清空表導致表出現UnavailableDB2AI
- nacos gateway 呼叫服務報錯503 Server unavailableGatewayServerAI
- Hadoop之JPS命令及真假現象(process information unavailable)HadoopORMAI
- TiDB故障處理之讓人迷惑的Region is UnavailableTiDBAI
- vue_resource和axiosVueiOS
- Resource is out of sync with the file system
- Error-Expected resource of typeError
- profile的resource limits和資源計劃resource_manager_plan的limitMIT
- HTTP 錯誤 503.4 - Service Unavailable FastCGI 池佇列已滿HTTPAIAST佇列
- [求助][iOS] 獲取 iOS 應用的 crash 報告,cpu_resource/diskwrites_resource/wakeups_resource 這些型別的如何分析iOS型別
- ApiBoot - ApiBoot Resource Load 使用文件APIboot
- Eclipse:Resource is out of sync with the file systemEclipse
- @Autowired 與@Resource的區別
- 2.7 Overview of Oracle Resource Manager in a CDBViewOracle
- Caused by: Error: ' ' is not a valid resource name characterError
- The bean ‘xxx‘, defined in class path resource , ......Bean
- Matrix原始碼分析————Resource Canary原始碼
- WPF FindResource,Resource[key] SystemColors TryFindResource
- @Autowired和@Resource的區別
- Kubernetes的Resource和Dashboard(十三)
- @Resource和@Autowired的區別
- @Autowired 和 @ Resource的區別
- vcenter執行兩年,突然訪問出現503 Service unavailableAI
- REST – 如何抽象為資源(Resource)REST抽象
- 資源路由resource index 不是get路由Index
- REST - 如何抽象為資源(Resource)REST抽象
- k8s resource的管理K8S
- 理解Maven Resource的過濾功能Maven
- @Autowired和@Resource有哪些區別