What does this error mean (Can't create TCP/IP socket (24))?

6,485

What does this error mean (Can't create TCP/IP socket (24))? is it OS error or Mysql error ?

$ perror 24
OS error code  24:  Too many open files

You can check the current settings by running:

# su - mysql -s /bin/bash -c '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) 127425
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
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
Share:
6,485

Related videos on Youtube

Thilina Shashimal Senarath
Author by

Thilina Shashimal Senarath

Updated on September 18, 2022

Comments

  • Thilina Shashimal Senarath
    Thilina Shashimal Senarath over 1 year

    I have web server with OS RHEL 6.2 and Mysql 5.5.23 on another server and the web server can read from Mysql server without problem, but some time I got this error:

    [Sun Sep 23 06:13:07 2012] [error] [client XXXXX] DBI connect('XXXX:192.168.1.2:3306','XXX',...) failed: Can't create TCP/IP socket (24) at /var/www/html/file.pm line 199.

    my question :

    What does this error mean (Can't create TCP/IP socket (24))? is it OS error or Mysql error ?

    perl -v
    This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
    
    mysql -V
    mysql  Ver 14.14 Distrib 5.5.23, for Linux (x86_64) using readline 5.1
    

     su - mysql -s /bin/bash -c '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) 127220
    max locked memory       (kbytes, -l) 64
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 1024
    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
    
  • Thilina Shashimal Senarath
    Thilina Shashimal Senarath over 11 years
    this is the result: