pBlueG / SA-MP-MySQL

MySQL plugin for San Andreas Multiplayer
BSD 3-Clause "New" or "Revised" License
196 stars 80 forks source link

Unloading plugin hang on rcon exit #158

Closed ghost closed 7 years ago

ghost commented 7 years ago

Well, I have global variable to which I store cached data after selection. I've noticed that when I have inserted into table like 3000 rows, afterwards selecting them together with row - variable assign loop works also butter smooth. But problem (?) occurs on rcon exit (gmx seems to #be working fine) when it actually takes like 50 second to shutdown I can see msg "plugin.mysql: Unloading plugin...". I don't save any cache anywhere as I've loaded data in callback.

What is causing this? Thank you.

Edit: It seems that Linux hosted server is working fine, just Windows is doing it

maddinat0r commented 7 years ago

Can you share your mysql.log file?

ghost commented 7 years ago

Oh, I think I got it. The issue was, that as I inserted 3 thousand of rows into table but some fields of the table were NULL, so it was also throwing an error into log continuosly for these rows, that's why it hanged on exit.

Now, when I inserted it correctly the exit works just fine as it should.

maddinat0r commented 7 years ago

Ah, that means the server hanged because it was still writing the error log lines. It probably worked so fast on Linux because you either use a SSD there or your table was valid.