FriendsOfFlarum / byobu

Well integrated, advanced private discussions for your Flarum forum.
https://discuss.flarum.org/d/4762-flagrow-by-bu-well-integrated-advanced-private-discussions
MIT License
54 stars 33 forks source link

504 - Timeout while activating the plugin #124

Closed JCKodel closed 4 years ago

JCKodel commented 4 years ago
<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.14.0 (Ubuntu)</center>
</body>
</html>

What can I do to fix it?

(note: I have 1,271,147 users, 8116 discussions, 29,669 posts)

imorland commented 4 years ago

I suspect this error is due to the migration required on the users table. It is entirely possible that the front end timed out, but the migration did in fact continue.

Are you able to connect directly to your DB, and check for a column blocksPd on users?

luceos commented 4 years ago

Running migrations in the commandline is safest. php flarum migrate

JCKodel commented 4 years ago
mysql> use mcc-forum;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> explain users;
+-----------------------+------------------+------+-----+---------+----------------+
| Field                 | Type             | Null | Key | Default | Extra          |
+-----------------------+------------------+------+-----+---------+----------------+
| id                    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| username              | varchar(100)     | NO   | UNI | NULL    |                |
| email                 | varchar(150)     | NO   | UNI | NULL    |                |
| is_email_confirmed    | tinyint(1)       | NO   |     | 0       |                |
| password              | varchar(100)     | NO   |     | NULL    |                |
| bio                   | text             | YES  |     | NULL    |                |
| avatar_url            | varchar(100)     | YES  |     | NULL    |                |
| preferences           | blob             | YES  |     | NULL    |                |
| joined_at             | datetime         | YES  | MUL | NULL    |                |
| last_seen_at          | datetime         | YES  | MUL | NULL    |                |
| marked_all_as_read_at | datetime         | YES  |     | NULL    |                |
| read_notifications_at | datetime         | YES  |     | NULL    |                |
| discussion_count      | int(10) unsigned | NO   | MUL | 0       |                |
| comment_count         | int(10) unsigned | NO   | MUL | 0       |                |
| read_flags_at         | datetime         | YES  |     | NULL    |                |
| suspended_until       | datetime         | YES  |     | NULL    |                |
| votes                 | int(11)          | NO   |     | NULL    |                |
| rank                  | varchar(255)     | YES  |     | NULL    |                |
| last_vote_time        | datetime         | YES  |     | NULL    |                |
| money                 | double           | NO   |     | 0       |                |
| username_bak          | varchar(100)     | NO   |     | NULL    |                |
| o_username            | varchar(256)     | YES  |     | NULL    |                |
| o_avatar_url          | varchar(100)     | YES  |     | NULL    |                |
+-----------------------+------------------+------+-----+---------+----------------+
23 rows in set (0.00 sec)

No blocksPd column.

JCKodel commented 4 years ago

php flarum migrate

PHP Notice:  Undefined offset: 1 in /var/www/html/mcc-forum.code.art.br/vendor/flarum/core/src/Extension/Extension.php on line 107
Migrating Flarum...
Nothing to migrate.
Migrating extension: flarum-approval
Nothing to migrate.
Migrating extension: flarum-emoji
Nothing to migrate.
Migrating extension: flarum-flags
Nothing to migrate.
Migrating extension: flarum-likes
Nothing to migrate.
Migrating extension: flarum-lock
Nothing to migrate.
Migrating extension: flarum-mentions
Nothing to migrate.
Migrating extension: flarum-sticky
Nothing to migrate.
Migrating extension: flarum-subscriptions
Nothing to migrate.
Migrating extension: flarum-suspend
Nothing to migrate.
Migrating extension: flarum-tags
Nothing to migrate.
Migrating extension: flagrow-linguist
Nothing to migrate.
Migrating extension: fof-polls
Nothing to migrate.
Migrating extension: fof-follow-tags
Nothing to migrate.
Migrating extension: wiwatsrt-best-answer
Nothing to migrate.
Migrating extension: fof-reactions
Nothing to migrate.
Migrating extension: michaelbelgium-discussion-views
Nothing to migrate.
Migrating extension: fof-user-directory
Nothing to migrate.
Migrating extension: fof-filter
Nothing to migrate.
Migrating extension: fof-moderator-notes
Nothing to migrate.
Publishing assets...
DONE.

Nothing happens (I guess it will migrate only activated extensions?)

imorland commented 4 years ago

Thanks. Assuming this is the first time you are activating this extension:

Ps - wiwatsrt/best-answer is quite old now and is known to contain a few issues. It has been superceded by fof/best-answer :)

JCKodel commented 4 years ago

Thanks. I've added the column in mysql and the migration was quick.

ALTER TABLE users ADD COLUMN blocksPd BOOLEAN DEFAULT 0;
Query OK, 0 rows affected (57.72 sec)
Records: 0  Duplicates: 0  Warnings: 0
imorland commented 4 years ago

Please be aware that there are other elements to the migration required for this. Manually adding the column alone may cause you some issues down the line.

Details here