SSH Tunneling makes everything lag?

Discussion in 'Bukkit Discussion' started by robxu9, Dec 17, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    robxu9

    Hi all,

    We have a MySQL server through our hosting provider. Unfortunately, since our Bukkit server is hosted on a dynamic IP, our only choice to access the MySQL server is through SSH tunneling. We had it all set up, we turned it on, and then the server went from about 20 TPS to about 5 TPS. It lagged really bad every second.

    Anyone have any improvements/guesses/what should we do?

    Thanks,
    robxu9
     
  2. Offline

    MechanID

    what plugins use MySQL ? please tell me both servers MySQL and Minecraft have dymnamic ip ?
     
  3. Offline

    robxu9

    We're using OKB3, iConomy 6, and WebAuction to link to the remote MySQL, which is on a static IP. However, our hosting provider has a firewall up for Remote MySQL (and for good reason, too), and our Bukkit server is dynamic IP. So SSH tunneling is our only other option, and when we ran a redstone clock, it seems that the lag occurs every time one of those 3 plugins sends a query to the MYSQL server... (one of those plugins is doing it every second)
     
  4. Offline

    MechanID

    ssh protocol is using enctpyion so if there is a lot of queries it can be slow, but i dont think so.
    Did you try enable "log-slow-queries" for MySQL server in my.cnf ?
    and to understend how loaded MySQL server try to log in to mysql via terminal and run
    Code:
    show full processlist;
     
  5. Offline

    robxu9

    +--------+------------------+-----------+------+---------+------+-------+-----------------------+
    | Id | User | Host | db | Command | Time | State | Info |
    +--------+------------------+-----------+------+---------+------+-------+-----------------------+
    | 127250 | teamione_economy | localhost | NULL | Query | 0 | NULL | show full processlist |
    +--------+------------------+-----------+------+---------+------+-------+-----------------------+
    1 row in set (0.00 sec)

    It isn't very loaded at all... yet killing the SSH Tunnel makes the server run largely faster... :-\
     
  6. Offline

    MechanID

    you run "show full processlist;"
    when MC server has 5 TPS ?
    cause processlist must show all active queries and there is nothing to show....

    edit
    if plugins use different logins it seems your curren mysql user dont have pems to show oather users queries.
     
  7. Offline

    robxu9

    Yup. And that's what boggles me. Just the SSH tunnel existing is slowing down the server by a huge factor.
    Bandwidth is already not an issue, we have a good bandwidth network.
    I don't know what else to try >_>

    ssh command: ssh -p<sshport> -f -N <username>@<host> -L 3307:localhost:3306
     
  8. Offline

    MechanID

    do you have root access on both servers to try set up tunnel via pptp or ipsec ?
     
  9. Offline

    robxu9

    No. The MySQL server is shared hosting. The Minecraft server we own and host.
     
  10. Offline

    MechanID

    sorry have no more ideas. only to set up MySQL on MC server... but as i understand there is some web frontend on shared hosting that uses MySQL.
     
Thread Status:
Not open for further replies.

Share This Page