Karl I've doing some research with Deepseek IA and it seems that those 500 errors and DB connection exhaustion on Flarum 2.0 RC8 are caused by the extension Social Groups 2.4.12 — Cascading 500 errors from /api/sq-user-groups/ on Flarum 2.0 RC8**
This is the report:
Every user profile page and every user listing triggers a burst of requests to /api/sq-user-groups/{id}, and all of them come back with HTTP 500. For example, opening a "Followers" page fired off 15+ failed requests in a row, one per follower listed:
/api/sq-user-groups/61 → 500
/api/sq-user-groups/1135 → 500
/api/sq-user-groups/1148 → 500
/api/sq-user-groups/1162 → 500
...and so on
Each failure also pops up the "Oops, something went wrong" toast, so on a page with many users, the UI just fills with red error messages.
How I traced it — the actual chain
This took me a while to figure out, so I'll lay out the discovery step by step:
The errors appear wherever a UserCard is rendered. Not just on follower pages — also on profile pages, user listings, hover cards, basically anywhere a user card shows up.
Both social-groups and ianm/follow-users hook into the same UserCard component. follow-users uses it to render its follower/following lists, and social-groups uses it to inject "group membership chips" into every user card forum-wide.
When a page renders many user cards at once (like a followers list with 28 users), social-groups fires one /api/sq-user-groups/{id} request per user to fetch their group memberships.
Every single one of those requests fails with a 500, because of the underlying database issue in the extension (more on that below).
So the follower page wasn't the cause — it was just the loudest symptom, because it renders the most user cards at once. The bug was already silently hitting every other page where user cards appear.
Root cause (as far as I can tell)
Two things seem to be going on:
- Custom table prefix not respected. My forum uses the prefix
fg_ for all tables. The extension appears to query tables without honoring this prefix, so it looks for social_group_posts when the real table is fg_social_group_posts, causing a "table not found" error that Flarum surfaces as a 500.
- Migrations report "Nothing to migrate", so it's not a missing-migration issue on my side — the schema should be up to date.
Why this becomes a bigger problem on shared hosting
My host (Hostinger) limits new MariaDB connections to 20 per second. Because social-groups fires so many simultaneous, failing queries on user-heavy pages, the connection pool gets exhausted quickly. Once that happens, the whole forum starts throwing:
SQLSTATE[HY000] [2002] Operation not permitted
(Connection: flarum, Host: localhost, Port: 3306)
Disabling social-groups makes both problems disappear instantly — no more 500s, no more connection exhaustion. So the extension is definitely the source.
Environment
- Flarum: 2.0.0-rc.8
ernestdefoe/social-groups: 2.4.12
- PHP: 8.4.23
- DB: MariaDB on Hostinger (shared hosting), table prefix
fg_
What I'm hoping to find out
- Is there a known incompatibility between Social Groups 2.4.12 and Flarum 2.0 RC8?
- Does the extension currently respect a custom table prefix like
fg_? If not, is a fix planned or in progress?
- Is there any patch, config workaround, or newer build I could test to get the extension working again without disabling it?
And that's Deepseek report about this issue. I have disabled the extension until gets updated.