Delay loading /network
!Friendica Support
Hi everyone, I have a big problem on my Friendica installation , When I connect to niwego.com/network , it takes 30/40 seconds to load the page,I chose to display only 10 post on the page, plus when I scroll it lags a lot.
I installed the plugin rendertime , this is the result , it has become almost unusable
Database: 3.619/0, Network: 0, Rendering: 40.65, Session: 0, I/O: 0.01, Other: 0.27, Total: 44.54
Class-Init: 0.005, Boot: 0.004, Init: 0, Content: 44.524, Other: 0.017, Total: 44.55
Ubuntu Server 24.04 LTS
This is the third installation of Friendica, on the others I have the delay, but on this installation (my personal one) it is too much.
Friendica runs on a virtual machine with 8 Cores and 8Gb of memory
Some suggestions , thanks...
This entry was edited (3 months ago)
Scifijunkie
in reply to NeMyS • • •NeMyS
in reply to Scifijunkie • • •I solved it by blocking the domain
*activitypub-troll.cf
, I had a lot of spam which slows down the network, it works fine now.Try to reduce the amount of posts per page to around 10, i had this error in the past and i solved it this way thanks to @Michael Vogel
Michael Vogel
in reply to Scifijunkie • • •There are a lot of reasons for these messages. It could be performance related. In this case you should try to enable the
rendertime
addon to check where the performance bottleneck is.If the times are okay, but you still have got timeouts, then the problem can also be your webserver or php. Then you could check for the maximum number of connections. You should consult your logfiles prior to check if the limits are reached.
Scifijunkie
in reply to Michael Vogel • • •Michael Vogel
in reply to Scifijunkie • • •Scifijunkie
in reply to Michael Vogel • • •Michael Vogel
in reply to Scifijunkie • • •Michael Vogel
in reply to NeMyS • • •Michael Vogel
in reply to NeMyS • • •advancedcontentfilter
addon? It would be interesting to see if this improves the performance.NeMyS
in reply to Michael Vogel • • •I disabled
advancedcontentfilter
(this problem of mine happened before I enabled all the plugins you see) since I blocked this domain I have no problem, I don't know if it's a coincidence. When I view the Workers queue, there were 40/50 sometimes more... Workers only for this domain. But if you want we can do some tests.I had a similar problem in the past @Scifijunkie and I solved it this way explorer.niwego.com/display/b0… Thanks to !Friendica Support Support
🦋༄𝔫𝕖𝚖ƴ᥉༄🦋
2024-03-23 17:19:31
NeMyS
in reply to NeMyS • • •That's it, loading
/network
Roland Häder
in reply to NeMyS • • •@𝔫𝕖𝚖ƴ᥉ @Michael Vogel @Scifijunkie Please repeat it again, maybe coincidence that you get better rendering time without the addon. This means that you enable the addon again, try to reload a few times in a row and then disable the addon again and try to reload in a few times again. So you can exclude coincidences like other programs on your server has maybe caused it.
Question aside: Is your server a "shared server", means you don't have
root
access to it or does it belong to you alone?NeMyS
in reply to Roland Häder • • •root domain
, the other oneexplore.ni..
is almost always offline and the virtual machine OffDo you want me to delete the domain *
activitypub-troll.cf
from Server-block list And disable plugins and see how long it takes for/network
to load? I currently have no latency issues, so far everything is working fast and as it should since i blocked the domain i listed above.I have access to the entire server, and I have
root
privileges , It is not a shared server.Thanks
Roland Häder
in reply to NeMyS • • •Michael Vogel
in reply to NeMyS • • •select count(*) from advancedcontentfilter_rules;
? I'm unsure where this problem originates.NeMyS
in reply to Michael Vogel • • •What parameters do I put in rule expression? Thanks
Michael Vogel
in reply to NeMyS • • •NeMyS
in reply to Michael Vogel • • •you told me to perform
select count(*) from advancedcontentfilter_rules;
, do i need to create a new rule?Michael Vogel
in reply to NeMyS • • •NeMyS
in reply to Michael Vogel • • •@Michael Vogel
Ah ok sorry I got confused , Just to be clear, I installed the plugin a while ago, but never configured it , not yet
Here he is
Michael Vogel
in reply to NeMyS • • •Scifijunkie
in reply to NeMyS • • •This is what I get with rendertime on while loading the page.
I however still get 504 Gateway Time-out when trying to view /network. I could however turn it from Proxied to DNS only when it comes to Cloudflare. Let me see if that will do anything and I'll report back if it worked or not.
Scifijunkie
in reply to NeMyS • • •Well, I turned it from Proxied to DNS only when it comes to Cloudflare, and it just now loaded /network.
I get the following from rendertime
This could suggest that Cloudflare Proxied servers consider all the Friendica traffic as something to block based on how much traffic is going through them. I can't say if this is true or not but I will keep it on DNS Only for now to see if it keeps loading /network and test /community/global as it is the only other page that gets the "504 Gateway Time-out" error. I'll report back later if it still works or if it breaks.
NeMyS
in reply to Scifijunkie • • •Scifijunkie
in reply to NeMyS • • •NeMyS
in reply to Scifijunkie • • •Scifijunkie
in reply to NeMyS • • •Scifijunkie
in reply to NeMyS • • •Scifijunkie
in reply to NeMyS • • •Well, I did a rather crazy thing. I looked to see if I could find something like htop but for hard drives. I found something called iotop. Now after running it I noted that the total and current disk read was going all over the place. I went ahead and tried to load /network while iotop was running and it would spike to 20 M/s. So I ran e4defrag and let it sit for a while. It finely settled to about 200 K/s. I went ahead and tried to load /network again. It spiked to about 2 to 4 M/s. I saw that some people reported that PeerTube was doing a slow down to so I loaded up my PeerTube which defaults to me to videos just on my PeerTube node. It spiked to 40 M/s.
Now the only real difference between the two to me is that I use lscr.io/linuxserver/mariadb:10.11.5-r0-ls123 when it comes friendica:stable and I use postgres:15 when it come to chocobozzz/peertube:production-bookworm. So it makes me wounder if I need to update mariadb.
Scifijunkie
in reply to NeMyS • • •Scifijunkie
in reply to NeMyS • • •Well, it seems it's not Friendica taking out the k3s node at least not all the time. It seems that maybe PeerTube and Friendica together were taking out the k3s node they are on. Now mind you I'm just guessing at this point since Friendica still will not load /network or /community/global and PeerTube gives me the following pop-up errors now and then:
Or something to the effect of "sorry can't load more vides".
It would do it on /videos/trending and /videos/recently-added.
I really don't have any spare servers I can just through together and do other tests right now. Now the spikes I noticed while using PeerTube and Friendica are on the Databases they use. That means Friendica is making mariadb spike between about 2.5 to 4 M/s and PeerTube is making postgres:15 spike between about 20 to 40 M/s.
Scifijunkie
in reply to NeMyS • • •Scifijunkie
in reply to NeMyS • • •Scifijunkie
in reply to NeMyS • • •NeMyS
in reply to Scifijunkie • • •Scifijunkie
in reply to NeMyS • • •Scifijunkie
in reply to NeMyS • • •Scifijunkie
in reply to NeMyS • • •NeMyS
in reply to Scifijunkie • • •I think it's a configuration issue regarding your problem , try opening a new thread on @Friendica Support and mention that you use #docker