Get the most out of your Centmin Mod LEMP stack
Become a Member

MariaDB Mini mc server on web server issues

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Tythus, Aug 6, 2014.

  1. Tythus

    Tythus Premium Member Premium Member

    56
    9
    8
    Aug 6, 2014
    Ratings:
    +12
    Local Time:
    11:18 PM
    For some reason whenever I put my minecraft server on it seems to have some issues connecting to the mariadb server that comes in centmin PEX and LogBlock have no issue but LWC always gets its connection killed after a while for some reason would you know I could go about fixing this maybe max connection is too small by default?

    EDIT: Thought I better state we havn't had this issue before on mysql
     
  2. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    8:18 AM
    Nginx 1.13.x
    MariaDB 5.5
  3. Tythus

    Tythus Premium Member Premium Member

    56
    9
    8
    Aug 6, 2014
    Ratings:
    +12
    Local Time:
    11:18 PM
    It's not minecraft it's self but what happens is at the start for the first X million milliseconds the MariaDB is accessible to LWC then suddenly it become incapable of connecting to the MariaDB server until a restart is called and we never had this problem when using it from the default mysql server. Also on a side not is it possible to make csf more lax on packets per X on 25565 it's fine usually but sometimes there is an issue.
     
  4. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    8:18 AM
    Nginx 1.13.x
    MariaDB 5.5
    Did you open port 25565 in CSF Firewall ?

    You probably need to look into your server logs and see if anything stands out.

    You can find your Centmin Mod install/menu logs at FAQ 7 and server logs at FAQ 19 at Centmin Mod FAQ - Menu based Nginx installer
     
  5. Tythus

    Tythus Premium Member Premium Member

    56
    9
    8
    Aug 6, 2014
    Ratings:
    +12
    Local Time:
    11:18 PM
    Yes but sometimes minecraft sends more packets than I think the firewall allows so it kills the connection is there a way to raise the limit?

    At /var/log/mysqld.log the only logged information is when I started the server on the centmin install otherwise there is no other information there.
     
  6. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    8:18 AM
    Nginx 1.13.x
    MariaDB 5.5
    Last edited: Aug 6, 2014
  7. Tythus

    Tythus Premium Member Premium Member

    56
    9
    8
    Aug 6, 2014
    Ratings:
    +12
    Local Time:
    11:18 PM
    Oh I found out what happened mariadb gets rid of old connections after X amount of time and LWC doesn't seem to realize it's connection is dead so it keeps trying to send info on a null connection
     
    • Like Like x 1
  8. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    8:18 AM
    Nginx 1.13.x
    MariaDB 5.5
    ah so your app needs a persistent connection to MariaDB MySQL. If you apps connector can set a persistent connection at it's end like PHP apps can do then that would be one way.. or look at raising MariaDB MYSQL connect and wait timeout values in /etc/my.cnf.

    Googled and found this out bug report on LWC LWC timing out · Issue #421 · Hidendra/LWC · GitHub and issue tracker search for MySQL Issues · Hidendra/LWC · GitHub

    oh and LWC/SQL Error · Issue #438 · Hidendra/LWC · GitHub

    autoreconnect LWC doesn't protect the chests and giving loads of stack traces in the server console/log · Issue #422 · Hidendra/LWC · GitHub - well leave rest to you as I never used LWC
     
    Last edited: Aug 7, 2014
  9. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    8:18 AM
    Nginx 1.13.x
    MariaDB 5.5
    Specific MySQL documentation for error MySQL :: MySQL Connector/J Developer Guide :: 15 Troubleshooting Connector/J Applications

    basically LWC developer end code changes required unless you want to raise wait_timeout

    If you didn't have problems with Oracle MySQL then probably because it defaulted to wait_timeout = 28800 seconds or 8hrs, while Centmin Mod MariaDB MySQL wait_timeout in /etc/my.cnf is much shorter
     
    Last edited: Aug 7, 2014
  10. Tythus

    Tythus Premium Member Premium Member

    56
    9
    8
    Aug 6, 2014
    Ratings:
    +12
    Local Time:
    11:18 PM
    yeh I just changed the wait timeout from 120 to 3600 I doubt it will timeout now
     
    • Like Like x 1
  11. eva2000

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    8:18 AM
    Nginx 1.13.x
    MariaDB 5.5
    let us know how it goes :)