MySQL DataSource closed at random

Discussion in 'BungeeCord Plugin Development' started by AuroraLS3, Aug 3, 2018.

  1. Hello - I have a bad bug in my plugin, where the MySQL connection pool DataSource starts throwing "DataSource is closed" errors after 3 to 8 hours of runtime.

    I can't reproduce the problem and the exception don't state the reason for the close.
    Both Apache DHCP2 and HikariCP DataSource are behaving this way (I tried replacing DHCP2 with HikariCP as first fix attempt).

    Here are the methods that use the connection pool

    - NPE inside MysqlIO code
    - Timeout Exception

    This issue seems to only occur on BungeeCord.
    If Waterfall is in use the likelihood is increased.
    If an external MySQL is in use (non-localhost) the likelihood is also increased.

    I've been stuck with this for about 3 weeks now, so any help is greatly appreciated. Thanks!