`
zhengdl126
  • 浏览: 2538492 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类

mysql_error:Error starting thread: Resource temporarily unavailable

 
阅读更多
121031 18:53:17  InnoDB: Unable to open the first data file
InnoDB: Error in opening ./ibdata1
121031 18:53:17  InnoDB: Operating system error number 11 in a file operation.
InnoDB: Error number 11 means 'Resource temporarily unavailable'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
121031 18:53:17 InnoDB: Could not open or create data files.
121031 18:53:17 InnoDB: If you tried to add new data files, and it failed here,
121031 18:53:17 InnoDB: you should now edit innodb_data_file_path in my.cnf back
121031 18:53:17 InnoDB: to what it was, and remove the new ibdata files InnoDB created 
121031 18:53:17 InnoDB: in this failed attempt. InnoDB only wrote those files full of 
121031 18:53:17 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
121031 18:53:17 InnoDB: remove old data files which contain your precious data!
121031 18:53:17 [ERROR] Plugin 'InnoDB' init function returned error.
121031 18:53:17 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 
121031 18:53:17 [ERROR] Unknown/unsupported storage engine: INNODB
121031 18:53:17 [ERROR] Aborting

121031 18:53:17 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

121031 18:53:17 mysqld_safe mysqld from pid file /data/mysql/mysql_3301/mysql_3301.pid ended
121031 18:54:29 mysqld_safe Starting mysqld daemon with databases from /data/mysql/mysql_3301
121031 18:54:29 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-
query-log'/'--slow-query-log-file' instead.
121031 18:54:29 InnoDB: The InnoDB memory heap is disabled
121031 18:54:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121031 18:54:29 InnoDB: Compressed tables use zlib 1.2.3
121031 18:54:30 InnoDB: Initializing buffer pool, size = 2.9G
121031 18:54:30 InnoDB: Completed initialization of buffer pool
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
121031 18:54:30  InnoDB: Retrying to lock the first data file
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
121031 18:54:30  InnoDB: Retrying to lock the first data file
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11


 

 

 

InnoDB: Error number 11 means 'Resource temporarily unavailable'.

 

 

Error starting thread: Resource temporarily unavailable
 
经过深入查询,排除了内存,句柄数等问题. 并且切换至root用户打开大量线程时没有问题。试着调整ulimit各项参数,最后发现是"max user processes "参数有问题,通过root用户调整大小至 12000,线程数也随着增大.
 
 
Java代码
root@blog:/home/badqiu# 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) 143360
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 2048
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 2046
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
 
在linux系统内生效。
vi /etc/security/limits.conf
 
Java代码
* soft nproc 12000
* hard nproc 12000
 nproc就是"max user processes",完整描述是: nproc - max number of processes
 
参数含义:
 
单个用户可以启动的线程数,因为进程也会启动一个线程,所以也间接对进程数有限制。
 
注意:
 
该参数只对普通用户有用,root用户不在此限制。 所以用root用户可以启动几万个线程,无法重现这个问题.

 

 

 

 

 

 

分享到:
评论

相关推荐

    rmmod的源码怎么这么麻烦

    rmmod命令的源码,busybox自带的rmmod运行的时候总是去找一个临时文件夹,如果系统不存在则会卸载失败,此程序不检测文件夹,卸载驱动的时候一定会成功

    无法卸载模块的解决办法.pdf

    用rmmod卸载模块的时候会弹出错误,如下 – rmmod: can't change directory to '/lib/modules': No such file or directory

    nginx connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)

    标题中的“nginx connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)”是一个常见的错误信息,这通常发生在Nginx尝试与PHP-FPM(FastCGI进程管理器)通信时,但遇到了资源暂时...

    win10 64位,Winavr+AVR studio 编译问题解决方案

    /usr/bin/sh: fork: Resource temporarily unavailable 装了WIN10 64位 发现AVR STDIO+WINAVR编译时出现了上述错误,这是WINAVR与64位系统不兼容的缘故 毕竟WINAVR是老物了 不过还是好用 很多朋友用习惯了。 复制到...

    AT指令返回错误大全

    - **CMEERROR:256 - Operation temporarily not allowed**:操作暂时不允许。 - **CMEERROR:257 - Call barred**:通话被禁止。 - **CMEERROR:258 - Phone is busy**:电话正忙。 - **CMEERROR:259 - User abort**:...

    onvif_srvd:ONVIF设备(IP摄像机)服务服务器(Linux守护程序)

    ONVIF设备(IP摄像机)服务服务器描述onvif_srvd -ONVIF设备(IP摄像机)服务服务器(Linux守护程序) 该服务器(服务)的实现最少。 将此服务器用作为IP摄像机编写ONVIF服务的模板。 ONVIF官方网站: : 及其。...

    tomcat报错Service Temporarily Unavailable tomcat解决方式

    Tomcat 报错 Service Temporarily Unavailable 解决方式 Service Temporarily Unavailableerror 是 Tomcat 中常见的一种错误,通常是服务器维护或容量问题引起的。解决这个错误的方法通常是重启服务器,但是有时候...

    Linux操作系统错误代码解释_中英文对照

    OS error code 11: Resource temporarily unavailable 操作系统错误代码11:资源暂时不可用 OS error code 12: Cannot allocate memory 操作系统错误代码12:无法分配内存 OS error code 13: Permission denied 操作...

    Android之GPS定位详解.pdf

    case LocationProvider.TEMPORARILY_UNAVAILABLE: Log.i(TAG, "当前 GPS 状态为暂停服务状态 "); break; } } public void onProviderEnabled(String provider) { Location location = lm....

    TID_20230626_PCID_1_AEBL_Temporarily_ValidTill_2023-07-31_SN_000894MGE0F12B2F2C363E2E1C1D1A1B.act

    TID_20230626_PCID_1_AEBL_Temporarily_ValidTill_2023-07-31_SN_000894MGE0F12B2F2C363E2E1C1D1A1B.act

    解决Python出现_warn_unsafe_extraction问题的方法

    在Python编程过程中,有时会遇到一个特定的错误:“AttributeError: ResourceManager instance has no attribute '_warn_unsafe_extraction'”。这个问题通常与Python的setuptools库及其与特定模块(如pymongo)的...

    Livox-SDK-master_Livox_

    《Livox SDK在雷达二次开发中的应用》 Livox SDK,全称为Livox Software Development Kit,是Livox公司提供的一款专业级的软件开发工具包,主要用于其雷达产品的二次开发。这款SDK提供了C++编程接口,使得开发者...

    解决nginx 503 Service Temporarily Unavailable方法示例

    最近网站刷新后经常出现503 Service Temporarily Unavailable错误,有时有可以,联想到最近在nginx.conf里做了单ip访问次数限制,(limit_req_zone $binary_remote_addr zone=allips:20m rate=20r/s;) 把这个数量放大...

    party:多次打开leveldb句柄

    OpenError: IO error: lock /home/substack/projects/level-party/example/data/LOCK: Resource temporarily unavailable at /home/substack/projects/level-party/node_modules/level/node_modules/level-packager

    good-first-issue::desktop_computer:用于查找优先事项的CLI

    npx good-first-issue [project] # temporarily install and run the module, optionally passing `project` 或者,您可以绝对将good-first-issue安装为全局模块: npm i -g good-first-issue # install glo

    master_villages:具有坐标和语言的东高加索村庄数据集

    [DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3824151.svg)](https://doi.org/10.5281/zenodo.3824151) Zenodo badge temporarily died 致谢 第一批数据(达吉斯坦的所有村庄和那里所说的语言)是由( )挖掘...

    socket错误代码对应表

    - **Socket error #10035 - Resource temporarily unavailable**:资源暂时不可用。 - **Socket error #10036 - Operation now in progress**:操作正在进行中。 - **Socket error #10037 - Operation already in ...

    冻结井井壁高性能混凝土配制及其施工工艺研究

    研究目的是加快井筒施工速度,提高混凝土施工质量;根据高性能混凝土配制原则、配制途径及配合比试验,配制出符合冻结井施工的高性能混凝土;通过对井筒井壁质量进行观测,井壁质量良好,掘进速度创造出新水平,经济效益...

Global site tag (gtag.js) - Google Analytics