pBlueG / SA-MP-MySQL

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

R41-4 - mysql_yinline functions sometimes freeze server on first call #184

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hey, I recently updated to latest YSI 4 and mysql R41-4 version. (from YSI 3.1 and R39-6) everything was working fine before though.

My issue is that sometimes when I start server for first time and I use any command, or any piece of code that simply executes mysql inline query functions, server just freezes. When I restart, basicly command is working and so is working everything for all time then.

More info here, I've asked already here too: https://github.com/Misiur/YSI-Includes/issues/269

maddinat0r commented 6 years ago

Enable full logging, reproduce your freeze and upload the mysql.log file here (or email me it if it contains sensitive data).

ghost commented 6 years ago

Thank you, I have sent the attachments to your email on github profile.

maddinat0r commented 6 years ago

It seems like the MySQL plugin is working properly. You should have a mysql_format call at SFB-EditText.pwn:1071 - that is the last successfully logged function call. Your freeze likely occurs somewhere after that line.

ghost commented 6 years ago

On line 1071 I have an enum defined. image

So you mean that I have some error in code for 30 pquery_inline calls?

maddinat0r commented 6 years ago

I just noticed that for some reason your debug data is corrupted. Every log message reports line 1070 or 1071, and it's always your SFB-EditText.pwn file. Try re-downloading every plugin and YSI, just to make sure.

Other than that I can't really give you any further help. The only thing I can say for sure is that the MySQL plugin itself doesn't cause this. High CPU usage usually hints at an infinite loop somewhere in your code. You could alternatively also try using Zeex' profiler plugin to try and pinpoint the issue.

ghost commented 6 years ago

As last I want to say that I downgraded to YSI 3.1 and I have no problem with that anymore. Well, I doubt that here is something wrong in code as it's doing same thing in multiple different inline pquery calls. However, there must be something in my 150k RP gamemode that has some kind of negative impact on it. When I or someone will figure what it may be, I'll definitely update to latest YSI, but not for now.

Thank you!