gudan garam
Advanced OT User
Hello people, so me and a few friends were testing different ways to crash a server and we figured a way (that everybody already knows about), that is by trashing the tiles of a house with thousands of items, possibly hundreads of thounsands, than leaving the house.
The crash is caused by the method mentioned on the title, when you leave a house, the method deletes all of the players inbox items to then re-insert them, thus, saving the items that just went from his house to his inbox.
As you may already have figured this out, mysql can't handle insert that many rows into the database and comes to an end, a sad one tbh. And then the server lags and possibly crashes.
I don't know if this is correct, but I think mysql crashes because it tries to insert all the player inbox items with onequery, that query takes to much time (or even memory, idk really) to execute that it crashes the service.
I haven't had time to check, but a friend suggested me to check some configs with mysql to have better batch inserts, and I have thought about a way to split this insert, into smallers inserts.
Lets take a small number just for explanation purposes.
If you are inserting 50 items into the table, insted of executing one query, lets execute 2 queries, inserting 25 items each query, I haven't had time to test that aswell, but a friend said that could help.
Another way would be to only execute this part on the server save, but that wouldn't help I think. As it would still halt mysql causing it to rollback the transaction.
What are your guyses thoughts? Have you had this issue? Did you fix it?
The crash is caused by the method mentioned on the title, when you leave a house, the method deletes all of the players inbox items to then re-insert them, thus, saving the items that just went from his house to his inbox.
As you may already have figured this out, mysql can't handle insert that many rows into the database and comes to an end, a sad one tbh. And then the server lags and possibly crashes.
I don't know if this is correct, but I think mysql crashes because it tries to insert all the player inbox items with onequery, that query takes to much time (or even memory, idk really) to execute that it crashes the service.
I haven't had time to check, but a friend suggested me to check some configs with mysql to have better batch inserts, and I have thought about a way to split this insert, into smallers inserts.
Lets take a small number just for explanation purposes.
If you are inserting 50 items into the table, insted of executing one query, lets execute 2 queries, inserting 25 items each query, I haven't had time to test that aswell, but a friend said that could help.
Another way would be to only execute this part on the server save, but that wouldn't help I think. As it would still halt mysql causing it to rollback the transaction.
What are your guyses thoughts? Have you had this issue? Did you fix it?