Closed chaun14 closed 5 years ago
The config object that the bot is inserting looks very wrong. It's supposed to be valid json, but that looks more like some kind of array converted to json. Does this happen with all config settings, or just the joinMessageChannel
?
I don't think those are millions of insert statements, just one really long one, but there's obviously something wrong.
it happend in all configurations with config
and interactiveConfig
commands
I am trying to use nodejs 10.16.3 but i got these error while connecting to discord
for the error with Zlib just downgrade it to 0.1.4
i've try to run the bot with nodejs 10 but the same problem happen. It work fine with a new db but the problem restart at the second launch of the bot (configs are resetted)
Can you try with mysql instead of mariadb?
What character encoding is your database / the settings
table / the value
column in the settings table?
I can't install mysql-community-server on my vps. I've tried to use mariadb 10.3 but the problem happens. For the encoding I've kept it default
I'm afraid I can't reproduce this issue. I tested with node 10.16.3 and everything works fine, on Windows 10 and Ubuntu 18.04.
What database server have you used for your test?
MariaDB 10.4.7
So I was able to reproduce this issue now, it is most certainly a MariaDB problem. The insert works for me, but also produces weird column data like the one that you showed. I believe it is related to this issue: https://github.com/sequelize/sequelize/issues/8702 that is fixed in sequelize v5, but this repo currently uses sequelize v4, and we are planning to switch to another ORM in the near future.
So for the official bot you are using mysql Community server?
Yes exactly, version 5.7.27
I've setup a private bot using invitmanager's code. Basic commands as help, prefix, ping and tracking system are working well. When I try to setup somthing (!config leaveMessageChannel #mychannel) the bot with a freshly created databse send millions INSERT operations to the database but after few seconds the config is set. With an bigger and older database the bot send billions INSERT request until discord timed out or the memory allocated to nodejs allocated memory is overloaded and the script crash
the begin of the unwanted operation:
After reboot all configs are reset.
what i see in the console: https://i.imgur.com/9heQC6k.gifv
mariadb version: 10.2.26-MariaDB-10.2.26+maria~stretch innodb_version: 5.7.27 debian 9 node version: v11.15.0 npm version: 6.7.0
Is someting wrong in my server / bot configuration? thanks for your help :)