What is causing my site to be so slow at random?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

John Connor

Lifer
Nov 30, 2012
22,757
619
121
Just want to add that if you update phpBB I would go with 3.1.9. 3.1.10 the latest has some issue people have pointed out. They may release some fixes, but I'm not upgrading yet. I use 3.1.9.
 

Red Squirrel

No Lifer
May 24, 2003
70,542
13,793
126
www.anyf.ca
I'll probably be going to SMF. I had started a migration project then got lazy, but I really need to just finish it. I have two forums that have been defunct for years because of it. :p

screen_shot_2015-08-20_at_01.02.58.png


screen_shot_2015-08-20_at_01.04.30.png


^
Basically combining 4 forums into 1. 1 that I will keep paying more attention to and updating as I go along. The nice thing with SMF is they publish per script update logs so it will make updating easier. I tend to mod stuff a lot so I can't just replace files.

I hate SMFs permission system though, it is a mess and very unintuitive. I might just totally redesign that part.

I actually made my own forum software called SquirrelBBS WAY back in the day, I ended up using it for a college project. Problem is back then I never bothered to use OOP or indent my code, so while it actually worked very well as a user, the code behind it was a nightmare. lol
 

Red Squirrel

No Lifer
May 24, 2003
70,542
13,793
126
www.anyf.ca
So it just did it to me at home. So I can rule out being an issue at work then.

I'm still leaning towards cache issue because all the images that should be cached are the ones that take long. All the icons for the forum and stuff, those are what take the longest to load. I can literally watch them load one by one.

Is there something I can do in apache to tell stuff to cache for longer? I could easily get away with like a year for most of the static content.
 

Red Squirrel

No Lifer
May 24, 2003
70,542
13,793
126
www.anyf.ca
I had already tried the ExpiresDefault directive but for some reason it still randomly reloads all the images. I am starting to wonder if something for that specific domain or site is somehow overriding the default behavior of Apache. I'd have to look through the phpbb code and see if something is doing something weird.

For shits and giggles I jacked up the TTL of the domain to 7 days just to see what happens but it's more than a DNS issue as it's the actual images that take long to load after the rest of the page already loaded. My TTLs are set to 5 minutes, which I suppose is kind of low anyway, I don't recall my justification for that, but I can probably increase those on all my domains.
 

John Connor

Lifer
Nov 30, 2012
22,757
619
121
Well, all I can add is what I already mentioned and that is CloudFlare. They will cache your content and serve it to users close to the edge server in their location. It is free unless you want to pay the $20/month to have their WAF, but Ninjafirewall which is free as well can offer a great WAF option.

I use phpBB as well and don't have this issue and I don't even use that htaccess directive. I also set cache time in CloudFlare to 7 days as well. Although, the BBcode images in the WYSIWYG editor seem to not load in an instant. But I do seem to get this behavior in Xampp.
 

Red Squirrel

No Lifer
May 24, 2003
70,542
13,793
126
www.anyf.ca
This kinda went away on it's own. I heard that OVH (my host) was getting some DDoS attacks for a while, not sure if it was maybe related.

Edit: Spoke too soon. Was on the forum just now and it took about 30 seconds to load 2 of the smilies. Only 2 of them. No idea WTF it does this. It just gets hung up on random small gifs.
 
Last edited:

Bernard20

Junior Member
Nov 30, 2016
7
0
1
You can improve your website speed with the following tips:

  1. Optimize the images: Using too many images in the website slow down the loading time of the website. Some software allow the users to save optimized images.
  2. Optimize database tables: The database also needs to be optimized to increase the speed. Use a faster gallery plug Remove inactive plugins from your website. Split your website comments into pages.
  3. Use HTML and Java-script compressor
  4. Use faster slider plugins: Slider plugins are also one of the reasons to slow down the website speed.
  5. Use a cache plugin: Your website speed usually slow up when the number of users visiting your website increases. To fix this issue, use cache plugins.
  6. choose a good web host: If you are not using a good web host service then everything you will try to speedup your website will simply fail
 

Tweak155

Lifer
Sep 23, 2003
11,449
264
126
While I didn't read everything admittedly, I will just add that I've had extremely slow performance due to some effects I was using on my site. The libraries I was referencing were hosted on another site (so as to automatically get any updates), and that site was having issues.

If you reference any coding packages, make sure those sites are not having issues, or pull the packages locally.
 

Red Squirrel

No Lifer
May 24, 2003
70,542
13,793
126
www.anyf.ca
Yeah I do my best to avoid referencing stuff off other sites, for security reasons. My site is rather simple, mostly CSS/html/php/mysql.

The slow down seems to be related to local .gif (small stuff like smilies and icons) files specifically. It will get hung up on random ones and take like 30 seconds just to download one.

I'll be redoing part of the site soon anyway so I'm hoping that the problem just goes away. My other sites hosted on the same server don't suffer this problem.