Mysql_error: Errorstartingthread: Resourcetemporarilyunava_MySQL

Source: Internet
Author: User
Mysql_error: Errorstartingthread: Resourcetemporarilyunavailable bitsCN.com


Mysql_error: Error starting thread: Resource temporarily unavailable

SQL code

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

InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html

121031 18:53:17 InnoDB: cocould 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 shocould 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

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' registry 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

SQL code

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

Error starting thread: Resource temporarily unavailable

After in-depth queries, problems such as memory and handle count are eliminated, and it is no problem to switch to the root user to open a large number of threads. Try to adjust the ulimit parameters, and finally find that there is a problem with the "max user processes" parameter. by adjusting the size of the root user to 12000, the number of threads also increases.

Java code

Root @ blog:/home/badqiu # ulimit-

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 file (-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

Takes effect in linux.

Vi/etc/security/limits. conf

Java code

* Soft nproc 12000

* Hard nproc 12000

Nproc is "max user processes", The Complete description is: nproc-max number of processes

Parameter description:

The number of threads that a single user can start. because a process also starts a thread, the number of processes is indirectly limited.

Note:

This parameter is only useful to common users, and root users are not limited here. Therefore, the root user can start tens of thousands of threads and cannot reproduce this problem.

BitsCN.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.