ThaPwned / WCS

Warcraft: Source using Source.Python to be faster, expandable, and flexible
GNU General Public License v3.0
30 stars 23 forks source link

[URGENT] SQLite Database issue -> WCS is not ready #63

Closed NosferatuJoe closed 3 years ago

NosferatuJoe commented 3 years ago

There is an issue where the database will create a ton of null records, essentially flooding the database and causing massive server lagg spikes & crashes.

This might be due to the latest commits where database edits have been made. I hope this can be resolved quickly since this issue renders WCS almost useless.

Also after x amount of uptime the WCS mod will stop loading and report "WCS is not ready, please wait." in chat whenever you try to use a command.

NosferatuJoe commented 3 years ago

Here a screenshot of a new database that is being used. Notice the amount of lists and "None" records:

image

NosferatuJoe commented 3 years ago
2021-04-03 16:22:24 - sp    -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/plugins/wcs/core/database/thread.py", line 231, in _tick
    callback(result)
  File "../addons/source-python/plugins/wcs/core/players/entity.py", line 317, in _query_get_player
    raise RuntimeError(f'Tried to insert a player\'s data more than once ({self.accountid} - {result["name"]}')

RuntimeError: Tried to insert a player's data more than once (None - None

2021-04-03 16:22:24 - sp    -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/plugins/wcs/core/database/thread.py", line 231, in _tick
    callback(result)
  File "../addons/source-python/plugins/wcs/core/players/entity.py", line 317, in _query_get_player
    raise RuntimeError(f'Tried to insert a player\'s data more than once ({self.accountid} - {result["name"]}')

RuntimeError: Tried to insert a player's data more than once (None - None

2021-04-03 16:22:24 - sp    -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/plugins/wcs/core/database/thread.py", line 231, in _tick
    callback(result)
  File "../addons/source-python/plugins/wcs/core/players/entity.py", line 317, in _query_get_player
    raise RuntimeError(f'Tried to insert a player\'s data more than once ({self.accountid} - {result["name"]}')

RuntimeError: Tried to insert a player's data more than once (None - None

2021-04-03 16:22:24 - sp    -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/plugins/wcs/core/database/thread.py", line 231, in _tick
    callback(result)
  File "../addons/source-python/plugins/wcs/core/players/entity.py", line 317, in _query_get_player
    raise RuntimeError(f'Tried to insert a player\'s data more than once ({self.accountid} - {result["name"]}')

RuntimeError: Tried to insert a player's data more than once (None - None

2021-04-03 16:22:24 - sp    -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/plugins/wcs/core/database/thread.py", line 231, in _tick
    callback(result)
  File "../addons/source-python/plugins/wcs/core/players/entity.py", line 317, in _query_get_player
    raise RuntimeError(f'Tried to insert a player\'s data more than once ({self.accountid} - {result["name"]}')

RuntimeError: Tried to insert a player's data more than once (None - None

2021-04-03 16:22:24 - sp    -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/plugins/wcs/core/database/thread.py", line 231, in _tick
    callback(result)
  File "../addons/source-python/plugins/wcs/core/players/entity.py", line 317, in _query_get_player
    raise RuntimeError(f'Tried to insert a player\'s data more than once ({self.accountid} - {result["name"]}')

RuntimeError: Tried to insert a player's data more than once (None - None

2021-04-03 16:22:24 - sp    -   EXCEPTION   
[SP] Caught an Exception:
Traceback (most recent call last):
  File "../addons/source-python/plugins/wcs/core/database/thread.py", line 231, in _tick
    callback(result)
  File "../addons/source-python/plugins/wcs/core/players/entity.py", line 317, in _query_get_player
    raise RuntimeError(f'Tried to insert a player\'s data more than once ({self.accountid} - {result["name"]}')

RuntimeError: Tried to insert a player's data more than once (None - None

I also noticed that this event increased the server's RAM with 200MB or so.