!Friendica Admins

idk what I have done to my Friendica but it shows a 502 Bad Gateway nginx error quite often....I added a few RSS sources from Reddit and that seemed to have messed it up but I don't understand what. I removed them since...

The nginx error logs show stuff like 2021/08/02 07:05:57 [error] 2732#2732: *1092 upstream timed out (110: Connection timed out) while reading response header from upstream, client: ******, server: social.trom.tf, request: "GET /ping?format=json&uid=22&_=1627677955767 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm-friendica.sock", host: "social.trom.tf", referrer: "https://social.trom.tf/network"

Didn't sleep trying to figure it out so am tired sorry for the messy message.

Basically now loads fine for a few minutes, then loads very slow to the point of nginx giving up as explained above. If any of you has any idea what I should try let me know. Gonna have some sleep now, not good to work on such things when you are zombie tired, you may mess things up more.

Thanks!

Friendica Admins reshared this.

in reply to Tobias

@Tobias Yes if I add fastcgi_read_timeout 300; proxy_read_timeout 300; to the nginx.conf seems to work, but it takes a while to load...

Question is why Friendica needs more time to answer.
That's what confuses me.... it happened right after I added 10 or so RSS feeds as my contacts. I deleted them as quick as I realized that but it seems it made no difference. Something broke.

Is there any hint in the PHP logs or the logs from Friendica?
I do not know what to look for in logs more specifically. There are lots of them drive.tromsite.com/s/wgEzn8YG8…

in reply to Tio

Personally I am not really fan of setting max_children to cosmic values. Increasing the number is IMO dead end. The moment you have all children processes busy your load average will be too high and its the cpu that will become your bottleneck, and once you reach that there will be no extra value to kick up. Surely distro defaults are low, but setting to 500 seems also crazy high.

@Tio check gist.github.com/holmberd/44fa5…

I noticed that for things like social networks where amount of users online is one thing but the fact there is always content being pulled in and sent out so your instance is busy constantly even without anyone online, setting pm to static is better approach.

@Tio
in reply to muppeth

@muppeth I'm just worried I may destroy it haha. I will have to look carefully into how to properly setup the static value. I am a bit in the dark when it comes to calculating the max_children for friendica. But I'll need to look into that for sure. I am wondering tho, even with that cosmic number pm.max_children = 500 if our resources seem to be really ok, is that a bad thing? Now our Friendica works really well and it barely uses our CPU or RAM.
⇧