# Can't create a new thread (errno 11)

**URL:** <https://forums.percona.com/t/cant-create-a-new-thread-errno-11/1391>\
**Category:** Other MySQL® Questions\
**Created:** [April 28, 2010, 7:40am UTC](https://forums.percona.com/t/cant-create-a-new-thread-errno-11/1391 "2010-04-28T07:40:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samaka4you](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@samaka4you](https://forums.percona.com/u/samaka4you)\
**Post date:** [April 28, 2010, 7:40am UTC](https://forums.percona.com/t/cant-create-a-new-thread-errno-11/1391/1 "2010-04-28T07:40:06Z")

</div>

Hello,

In web site made on drupal + mysql. I have roughtly this error :

“Can’t create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug”

What is the solution of the problem?

FYI : MySQL version 5.0.67  
and Drupal 6.X

for information, I use 1Go of RAM this database and this the configuration fro about more tant 1000 user on website:

[mysqld]

tmp\_table\_size=32M  
query\_cache\_size=32M  
thread\_cache\_size=512  
max\_connections=500  
open\_files\_limit=3000

skip-locking  
key\_buffer\_size = 64M  
max\_allowed\_packet = 64M  
table\_cache = 5000  
myisam\_sort\_buffer\_size = 64M  
sort\_buffer\_size = 16M  
join\_buffer\_size = 8M  
read\_buffer\_size = 8M  
read\_rnd\_buffer\_size = 4M  
net\_buffer\_length = 2K  
thread\_stack = 256K

max\_binlog\_cache\_size = 1M  
max\_join\_size = 24M  
max\_seeks\_for\_key = 2M  
max\_write\_lock\_count = 512K  
myisam\_max\_sort\_file\_size = 4M

interactive\_timeout = 25  
wait\_timeout = 300  
connect\_timeout = 10  
max\_connect\_errors = 3000

#if you get a long query selecting a lot of data you might want to increase this  
query\_cache\_limit = 32M  
query\_cache\_type = 1

########################  
##Configuration Innodb##  
##Uncomment the next line to disable Innodb

#skip-innodb

innodb\_buffer\_pool\_size = 32M  
innodb\_additional\_mem\_pool\_size = 8M

innodb\_log\_file\_size = 10M  
innodb\_log\_buffer\_size = 4M

innodb\_flush\_log\_at\_trx\_commit=1

Please help me.

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [April 29, 2010, 11:24am UTC](https://forums.percona.com/t/cant-create-a-new-thread-errno-11/1391/2 "2010-04-29T11:24:04Z")

</div>

The ‘perror’ utility installed with MySQL will tell you the meaning of an error code. In this case,

[[baron&#64;ginger](mailto:baron&#64;ginger) ~]$ perror 11  
OS error code 11: Resource temporarily unavailable

The error probably means what the error message from MySQL says: you are out of memory. Your configuration looks very bad. Just comment out the following:

sort\_buffer\_size = 16M  
join\_buffer\_size = 8M  
read\_buffer\_size = 8M  
read\_rnd\_buffer\_size = 4M

Those can easily be the cause of your problem. Leave those at their defaults until you are an expert and you can prove they need to be tuned ) But at the same time, other things might be happening on the server that are consuming memory. So maybe it is the combination of a few queries using a bunch of memory, and a backup job, or something else like that.

Finally, if you are using InnoDB your configuration is almost certainly not right for more than a few MB of data.
