Debian9 - MariaDB 10.1 - errno: 24 "Too many open files" not IMSCP related

  • - IMSCP: 1.4.7
    - Distribution: Debian 9
    - Proftpd
    - PHP FCGID
    - MariaDB 10.1
    - Courier
    - Roundcube
    - Pydio


    Today I have to do a emergency migration from 1.4.3 ... all files are migrated and database are imported from mariadb 10.0 .. should be ready to start migration.
    But if I run mysql_upgrade --force I get many errors:


    mysqlcheck: Error: Couldn't get table list for database db: Can't read dir of './db/' (errno: 24 "Too many open files")



    OK, so now I have tried to set this:



    Code
    1. mkdir /etc/systemd/system/mysql.service.d
    2. nano /etc/systemd/system/mysql.service.d/override.conf
    3. added:
    4. LimitNOFILE=1024000
    5. systemctl daemon-reload
    6. systemctl restart mysql.service


    but it does not work:
    cat /proc/$(pgrep mysql)/limits | grep files
    Max open files 16364 16364 files


    I guess I need some help here w/ the migration ...

  • Today I have to do a emergency migration from 1.4.3 ... all files are migrated and database are imported from mariadb 10.0 .. should be ready to start migration.
    But if I run mysql_upgrade --force I get many errors:

    So, you imported the files from your old Debian Jessie server to your new Debian Stretch server, right? How did you imported the databases exactly? When you say: I've imported ... You mean that you copied the files from the old server /var/lib/mysql directory to the new server /var/lib/mysql directory, or you have done a dump of all databases and restored them using the mysql command line tool?


    We need more details about all steps you followed and please, try to me more clear.


    but it does not work:
    cat /proc/$(pgrep mysql)/limits | grep files
    Max open files 16364 16364 files

    Modifying the open file limit at systemd level is not sufficient. You must also change the open file limit parameter for the SQL server:


    /etc/mysql/conf.d/limits.cnf

    Code
    1. [mysqld]
    2. open_files_limit = 1024000

    Then, service mysql restart

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • thanks Nuxwin,
    I have imported the complete mysql.sql dump w/ all databases.
    The entrys to /etc/mysql/conf.d/limits.cnf and restart shows the same result:


    cat /proc/$(pgrep mysql)/limits | grep files
    Max open files 16364 16364 files


    I did a mysql check/repair and it worked ...
    I guess I will try the setup migration now amd we will see ...

  • @ Nuxwin, can I ask you for help w/ the migration process?


    trouble w/ net2ftp ... I have already set it to net2ftp in imscp.conf (prevous imscp used pydio)


    Code
    1. [ERROR] Package::FileManager::uninstall: Can't locate Package/FileManager/Net2FTP/Net2FTP.pm in @INC (you may need to install the Package::FileManager::Net2FTP::Net2FTP module) (@INC contains: /usr/local/src/imscp-1.4.7 /usr/local/src/imscp-1.4.7/engine/PerlLib /usr/local/src/imscp-1.4.7/engine/PerlVendor /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at (eval 1078) line 2

    edit:
    Update 1.4.1 error Net2FTP


    OK, got it - migration wnet well ... so far ;-)
    but it would be nice if you could re-check everything if possible ... I will pay for the service

    Edited 2 times, last by fulltilt ().

  • @fulltilt


    Can I do the work this evening? I'm a bit busy ATM ;)



    Thank you for your understanding.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • I guess there is a problem w/ mysql after migration ... any idea?

    Code
    1. /etc/cron.daily/logrotate:
    2. mysqladmin: connect to server at 'localhost' failed
    3. error: 'Access denied for user 'root'@'localhost' (using password: NO)'
    4. error: error running shared postrotate script for '/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log '
    5. run-parts: /etc/cron.daily/logrotate exited with return code 1
  • open files problem solved ...
    set open files for mariadb debian9