L2JMobius

High Five DatabaseFactory: Could not get a connection

Strelook66 · 8 · 672

Offline Strelook66

  • Knight
  • ***
    • Posts: 82
Hi all,

I am facing an issue with the Database factory, where for some reason it loses connection. This happens if for a,longer period of time I haven't logged into the game, and at the next logon the errors will start:

Code: [Select]
2024.02.11 09:59:35,827 SEVERE 82 org.l2jmobius.commons.database.DatabaseFactory DatabaseFactory: Could not get a connection. java.sql.SQLSyntaxErrorException: No connection available within the specified time (option 'connectTimeout': 10,000 ms)
2024.02.11 09:59:36,707 SEVERE 88 org.l2jmobius.commons.database.DatabaseFactory DatabaseFactory: Could not get a connection. java.sql.SQLSyntaxErrorException: No connection available within the specified time (option 'connectTimeout': 10,000 ms)
2024.02.11 09:59:45,060 SEVERE 47 org.l2jmobius.commons.database.DatabaseFactory DatabaseFactory: Could not get a connection. java.sql.SQLSyntaxErrorException: No connection available within the specified time (option 'connectTimeout': 10,000 ms)


And the error keeps repeating each second, sometimes multiple times a second.
I tried restarting the GS but due to the error it cannot restart so the only option is to end task the GS. I checked my database, the mysql settings. Did a fresh reinstall of java, but the issue is there.

I will try to catch the error, but it will take some time since it doesnt happen all the time or while i'm logged in.

If anyone has faced this issue, or maybe have some hints in which direction to go, would appreciate it.

Thanks!


Online dramaa

  • Elder
  • ****
    • Posts: 127
because of you changed name of database, you have to use database name presented there ../game/config/server.ini, there check # Database URL and use correct name for database. in short, next time dont change basic database name, it's gives name that should be used when installing databases.
i might be wrong tho, but looks like it


Offline Strelook66

  • Knight
  • ***
    • Posts: 82
It has nothing to do with what you change in the .ini file as long as you understand what and how to change.  The game runs just fine when I am playing on it with some friends. The issue as i said its happening after a longer of period of player inactivity.

You can setup your URL to the database as you see fit and the LS and GS will take that configuration from the .ini files.


Online dramaa

  • Elder
  • ****
    • Posts: 127
It has nothing to do with what you change in the .ini file as long as you understand what and how to change.  The game runs just fine when I am playing on it with some friends. The issue as i said its happening after a longer of period of player inactivity.

You can setup your URL to the database as you see fit and the LS and GS will take that configuration from the .ini files.

based on error it's database problem, that's why i guess it, but if you changed url in gameserver and loginserver too, then i am wrong.


Offline Black Judge

  • Heir
  • **
    • Posts: 36
this is a problem with access to the database, for some reason after some time after starting the game server, the database stops responding, this is more like some kind of protection against connection attempts
after I installed a database on a remote server for a test, I faced the same problem. This may be due to the fact that the database address does not contain localhost
I have a line for connecting to a test server where the database is installed looks like this
URL = jdbc:mariadb://myip:3306/admin_la2_server_l2jmobius_interlude?useUnicode=true&characterEncoding=utf-8&useSSL=false&connectTimeout=10000&interactiveClient=true&sessionVariables=wait_timeout=15,inter active_timeout=100
where myip is the address of my server with a database, the game server is installed on another computer on a different network
After a forced reboot of the game server, the problem disappears for a while


Online Liamxroy

  • Grand Duke
  • *****
    • Posts: 761
    • Adenaplease!
where myip is the address of my server with a database, the game server is installed on another computer on a different network

Tell me that you are joking!


Online G-hamsteR

  • Viscount
  • *****
    • Posts: 335
The connection to the database has been lost. Check some slow queries, check your active mysql connections, etc. Your database is unreachable and there could be many reasons for this.