I just updated a site and now I’m not able to access /my/preferences/account. I get Server Error while trying to load /user-badges/jayp.json Error code: 504 Gateway Time-out
I tried safe mode, and removed the only non-standard plugin (retort).
Though other users do seem to be able to access their preferences. Many are complaining about group-based theme modifications not working, so it seems that there might be some problem with groups.
Other pages seem to load fine, however. I don’t see anything in the logs in the web interface and don’t see it in the rails logs either.
I cannot replicate this here or on another site that I upgraded today.
EDIT: My current guess is that the problem has to do with some custom badge. There are many of them, but they aren’t SQL badges, and now that I see that, the badge hypothesis doesn’t make much sense.
AFAIK, the number of Badges a New member can get is relatively few, and progressing to Basic member is not a high hurdle. Perhaps performance can be improved by taking New out of the query for those Badges that are impossible for a New member to get and running two queries instead?
Didn’t test with previous versions, but I have a feeling that this has been like this for a while. The number of queries will only increase dramatically if a user has badges granted by different staff members.