Closed baldengineer closed 3 years ago
bot_1 | baldengineer(baldengineer): !topic bot_1 | bot_1 | error has occurred while triggering a event on a mod, details: bot_1 | mod: usermessagecount bot_1 | event: Event.on_raw_message bot_1 | error: <class 'sqlalchemy.exc.StatementError'> bot_1 | reason: (sqlalchemy.exc.InvalidRequestError) Can't reconnect until invalid transaction is rolled back bot_1 | [SQL: UPDATE users SET message_count=(users.message_count + %(message_count_1)s), last_update=%(last_update)s, last_message=%(last _message)s WHERE users.user_id = %(user_id_1)s AND users.channel = %(channel_1)s] bot_1 | [parameters: [immutabledict({})]] bot_1 | stack trace: bot_1 | Traceback (most recent call last): bot_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1202, in _execute_context bot_1 | conn = self._revalidate_connection() bot_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 469, in _revalidate_connection bot_1 | raise exc.InvalidRequestError( bot_1 | sqlalchemy.exc.InvalidRequestError: Can't reconnect until invalid transaction is rolled back bot_1 | bot_1 | The above exception was the direct cause of the following exception:
I added some error handling to at least catch the bad queries and roll them back, but I'm going to leave this open for awhile to see if we can catch it doing it again.
bot_1 | 2020-11-11T16:24:20.744709: bej1 left #baldengineer bot_1 | error has occurred while triggering a event on a mod, details: bot_1 | mod: userchattimelogging bot_1 | event: Event.on_user_part bot_1 | error: <class 'sqlalchemy.exc.OperationalError'> bot_1 | reason: (mysql.connector.errors.OperationalError) MySQL Connection not available. bot_1 | [SQL: UPDATE users SET time_in_channel=(users.time_in_channel + %(time_in_channel_1)s), last_update=%(last_update)s WHERE users.user_id = %(user_id_1)s AND users.channel = %(channel_1)s] bot_1 | [parameters: [immutabledict({})]]
followed by bot_1 | bot_1 | error has occurred while triggering a event on a mod, details: bot_1 | mod: userchattimelogging bot_1 | event: Event.on_user_join bot_1 | error: <class 'sqlalchemy.exc.StatementError'> bot_1 | reason: (sqlalchemy.exc.InvalidRequestError) Can't reconnect until invalid transaction is rolled back bot_1 | [SQL: SELECT users.user_id AS users_user_id, users.channel AS users_channel, users.user AS users_user, users.time_in_channel AS users_time_in_channel, users.message_count AS users_message_count, users.cheers AS users_cheers, users.last_update AS users_last_update, users.last_message AS users_last_message bot_1 | FROM users bot_1 | WHERE users.user_id = %(user_id_1)s AND users.channel = %(channel_1)s] bot_1 | [parameters: [immutabledict({})]]
I think what might be happening is there is a connection issue for some reason and it's making everything afterwards barf
bot_1 | 2020-11-17T09:07:39.391739: user1 left #baldengineer bot_1 | 2020-11-17T22:56:29.928117: user2 left #baldengineer
I'm beginning to suspect mysql is timing out. The default timeout is 28800 seconds, or 8 hours.
Maybe not though, because when the announcements were running, that would have kept the connection open, but the length of time between the two events was almost 14 hours...
@baldengineer has the crash ever happened mid-stream?
No, I can't think of a time the bot crashed, with this issue, while streaming. (The last time the bot crashed during the stream was early-on in the stream.)
bot_1 | baldengineer(baldengineer): !topic bot_1 | bot_1 | error has occurred while triggering a event on a mod, details: bot_1 | mod: usermessagecount bot_1 | event: Event.on_raw_message bot_1 | error: <class 'sqlalchemy.exc.StatementError'> bot_1 | reason: (sqlalchemy.exc.InvalidRequestError) Can't reconnect until invalid transaction is rolled back bot_1 | [SQL: UPDATE users SET message_count=(users.message_count + %(message_count_1)s), last_update=%(last_update)s, last_message=%(last _message)s WHERE users.user_id = %(user_id_1)s AND users.channel = %(channel_1)s] bot_1 | [parameters: [immutabledict({})]] bot_1 | stack trace: bot_1 | Traceback (most recent call last): bot_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1202, in _execute_context bot_1 | conn = self._revalidate_connection() bot_1 | File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 469, in _revalidate_connection bot_1 | raise exc.InvalidRequestError( bot_1 | sqlalchemy.exc.InvalidRequestError: Can't reconnect until invalid transaction is rolled back bot_1 | bot_1 | The above exception was the direct cause of the following exception: