fivem-mysql-async icon indicating copy to clipboard operation
fivem-mysql-async copied to clipboard

Multiples servers

Open iProSENT opened this issue 5 years ago • 3 comments

I would like to know if MySQL-Async works well with querying multiple servers in a single database. I say this because we need to open two servers with the same information, where if the player disconnects from server one, and enter server two, it will get information from the same database. We tested this some time ago, and some money synchronization problems were presented.

iProSENT avatar May 22 '19 12:05 iProSENT

As far as I know (unless mysql async does some caching which I'm pretty sure it doesn't) this should just be up to the database and databases are inherintely made to work really well concurrently (with multiple connections) If it wasn't then you would also get errors since mysql async runs concurrently (async) So yeah pretty sure it would work. There's just a few plugins themselves which use caching (esx datastore and addonaccount out of the top of my head) which will need a check with the database before changing anything

niekschoemaker avatar Jun 13 '19 05:06 niekschoemaker

Depents on the transaction that you are doing to the db. you can have multiple problems listed below:

  • deadlock
  • temporary update problem
  • incorrect Summary problem
  • lost update problem
  • unrepeatable read problem
  • phantom read problem It wil also depent on with dbms you are using

HZsven avatar Jun 17 '20 16:06 HZsven

The reason this is not a good method is most frameworks cache server side, so you are gonna have a lot of issues, where abuse can be made, 2 server is not viable with same db, unless you do 0 caching in tables in lua.

benzon avatar Sep 22 '20 09:09 benzon