michaelcpuckett / ap-groups

Groups for the Fediverse
https://chirp.social
MIT License
36 stars 0 forks source link

Some pages are loading slowly #16

Closed michaelcpuckett closed 1 year ago

michaelcpuckett commented 1 year ago

Traffic has increased so I need to look into performance tuning.

michaelcpuckett commented 1 year ago

Note: Turning on Cloudflare breaks the server, because HTML/JSON pages get mixed up

dakkar commented 1 year ago

Cloudflare is also returning 403 for webfinger queries from my instance and my home connection…

I suspect that it gets very confused by non-browsers sending requests

michaelcpuckett commented 1 year ago

@dakkar Thanks for letting me know! I just turned off Cloudflare for webfinger

I was getting a ton of requests, so I might have to figure out an alternate solution

dakkar commented 1 year ago

curl -v -H 'Accept: application/ld+json' 'https://chirp.social/.well-known/webfinger?resource=acct:perl@chrip.social' still 403 from here 😕

a header says:

report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=9PgUA%2FoXymOv8f6L4lXi149mAUHRjFHdNns2lAvj%2FtGBrtJnSmHprK7APhjgGOfFWr6Gp0mbkEgdsMoLfoUb8UmmuO3ov8k7cnEE2Xfmyo8omiiTD8jjQHM5VIusJA%3D%3D"}],"group":"cf-nel","max_age":604800}

if it helps any

I appreciate that running a popular fedi node is a pain!

michaelcpuckett commented 1 year ago

@dakkar That's interesting -- I got the same thing when curling but updated some configuration settings in Cloudflare and it seems ok now

Would you mind to try again?

michaelcpuckett commented 1 year ago

@dakkar Oh also that will give you an XML version... There is no ld+json version, only application/json and application/jrd+json

dakkar commented 1 year ago

ah! I'm not sure what mimetypes my Misskey instance asks for, but it works now!

Thanks you for the very quick response!

michaelcpuckett commented 1 year ago

Traffic has reduced and this is less of an issue now.

Just noting that Cloudflare isn't really helpful in this case (due to the vary header). May need to look into alternate solutions

mjgardner commented 1 year ago

I'm getting Cloudflare "Gateway time-out Error code 504"s on everything but the home page. Guess it's still a problem?

michaelcpuckett commented 1 year ago

This was a different problem today actually! The site should be working again. 😅