View Full Version : How to speed up vbulletin page load times
michelle86
03-26-2012, 11:00 PM
Members of my forum are complaining about the site loading slow lately.
I realize at this point that I should probably move my site to dedicated server hosting, but I do not have the funds to so anytime soon. So right now bluehost will have to do.
I currently have about 10,000 members. 10% are active.
So what other ways can I speed up my forum? Temporary files somewhere that are taking up space that I can delete? Settings in the cpanel that I can change somehow?
Along with slow loading time for my site, people have also complained about vbulletin database errors which I have tried fixing in the past to no avail (vbulletin blames my host. my host blames vbulletin). Also someone recently said this:
The "Are you sure you want to leave the page" and database error has happened to me.. and double posts, even though I only press the submit button once.
I have no clue about what to do about any of this. All suggestions are welcome! And if you'd like the link to my site, please PM me. I can give you a temporary account that you can view the site with.
Pandemikk
03-26-2012, 11:22 PM
Get rid of BlueHost. They're notorious for having sub-standard quality. If you want to stick with a shared server, I'd recommend Liquidweb. They're slightly more pricey but their support is much better. They wouldn't simply blame vBulletin.
michelle86
03-26-2012, 11:41 PM
I can change hosts to a dedicated server probably within the next year or so. So I really don't want to move everything to a new shared server if it would only be for a short amount of time. I'd like to see if there are any other options.
My forum home page is 101.93 kb. Big? How can I decrease it? I already have GZip HTML output enabled and compression set to 1.
vbenhancer
03-27-2012, 01:27 AM
dedicated server will not make your site faster on its own... you need a host that is reliable... BlueHost is one of the worst in the market...
no matter how you compress or enhance your site, the host is more important than the way to deal with the design etc, because the browser will handle it anyway. right now, we do not have the numbers to your stats, so we can not compare performances...
a dedicated server will not help you if you can not handle its building and configuration on your own, because you will have to pay for someone to do the job that is included in a VPS... and your problems are not related to the server you're on, but the software handling your hosting...
blueHost and some other hosts are always targetting the software, so they can not be pointed at... but when blueHost is pointing at vBulletin, HostGator on their side use vBulletin as their support forum, so they know exactly how it works on a server, and they can deal with your configurations when needed... some other hosts act seriously like HG as well...
Pandemikk
03-27-2012, 03:52 AM
I can change hosts to a dedicated server probably within the next year or so. So I really don't want to move everything to a new shared server if it would only be for a short amount of time. I'd like to see if there are any other options.
My forum home page is 101.93 kb. Big? How can I decrease it? I already have GZip HTML output enabled and compression set to 1.
That's not going to help. If your site is loading very slowly there's only two reasons why:
Client-side Issues
Server-side Issues
Examples of client-side issues: Slow internet, old browser, person is using Internet Explorer (just joking), too much javascript, flash, etc on the web page.
Examples of server-side issues: Database congestion (if one is being used), poorly configured settings (apache, mysql, php, etc), your host is throttling your connections (happens more often than you think).
102 kb is not big at all. There's no reason why it should take a modern user more than a second, maybe two, to load that.
Switch your hosts.
michelle86
03-27-2012, 03:54 AM
right now, we do not have the numbers to your stats, so we can not compare performances...
Okay, I used http://www.webpagetest.org for these stats:
Load Time: 5.988s
First Byte: 0.744s
Start Render: 2.285s
Result (error code): 0
When opening my site in a browser (cookies/cache cleared) it takes less than 2 seconds for the site to fully load for me. So I don't know where the 5.988 seconds above comes from.
Different speed test show different results. Here's results from http://www.selfseo.com/website_speed_test.php
Size: 101.55 KB
Load Time: 1.37 seconds
Average Speed per KB: 0.01 seconds
Pandemikk
03-27-2012, 04:04 AM
It would help to have a link to your site.
A load time of nearly 6 seconds is unacceptable.
michelle86
03-27-2012, 04:05 AM
102 kb is not big at all. There's no reason why it should take a modern user more than a second, maybe two, to load that.
It really doesn't take more than a couple seconds to load. I don't really know why my members are complaining so much. So many of them were saying it was slow, I was thinking that maybe there's a problem if so many are complaining.
But if 1-2 seconds to load is OK, then I guess I don't have to worry about speed?
Just focus on these database errors I get once in awhile.
Here are a couple errors. The database errors happen roughly between 1-4am EST almost every night from what my members tell me. Sometimes I'm up that late to catch it. I don't always get an email when they happen, but here are the last couple that I did get emails for:
Database error in vBulletin :
mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: User ******* already has more than 'max_user_connections' active connections
/home1/*****/public_html/members/includes/class_core.php on line 315
MySQL Error :
Error Number :
Request Date : Friday, March 23rd 2012 @ 11:22:47 PM
Error Date : Friday, March 23rd 2012 @ 11:22:47 PM
Script : http://************/mgc_cb_evo_ajax.php
Referrer : http://************/forum.php
IP Address : 72.87.142.139
Username :
Classname : vB_Database
MySQL Version :
And another random one from awhile back:
Database error in vBulletin 4.1.8:
Invalid SQL:
SELECT alb.albumid, att.attachmentid, att.userid, att.caption, att.dateline, att.state, fdt.filesize, IF(fdt.thumbnail_filesize > 0, 1, 0) AS hasthumbnail, fdt.thumbnail_dateline, fdt.thumbnail_width, fdt.thumbnail_height, u.username
FROM album AS alb
LEFT JOIN attachment AS att ON alb.albumid = att.contentid
LEFT JOIN filedata AS fdt ON att.filedataid = fdt.filedataid
LEFT JOIN user AS u ON att.userid = u.userid
WHERE alb.state = 'public' AND att.contenttypeid = '8'
ORDER BY rand(869630)
LIMIT 6;
MySQL Error : Lost connection to MySQL server during query
Error Number : 2013
Request Date : Tuesday, January 10th 2012 @ 08:18:47 PM
Error Date : Tuesday, January 10th 2012 @ 08:20:52 PM
Script : http://************/content.php
Referrer : http://************/usercp.php
IP Address : 74.243.173.27
Username : *****
Classname : vB_Database
MySQL Version :
--------------- Added 1332824941 at 1332824941 ---------------
It would help to have a link to your site.
A load time of nearly 6 seconds is unacceptable.
I sent you a PM
--------------- Added 1332825482 at 1332825482 ---------------
It would help to have a link to your site.
A load time of nearly 6 seconds is unacceptable.
I just tested your site (body bags) with that first speed test and it says:
Load Time: 6.574s
First Byte: 0.656s
Start Render: 3.538s
So maybe it isn't very accurate?
Pandemikk
03-27-2012, 04:19 AM
It really doesn't take more than a couple seconds to load. I don't really know why my members are complaining so much. So many of them were saying it was slow, I was thinking that maybe there's a problem if so many are complaining.
But if 1-2 seconds to load is OK, then I guess I don't have to worry about speed?
Just focus on these database errors I get once in awhile.
Here are a couple errors. The database errors happen roughly between 1-4am EST almost every night from what my members tell me. Sometimes I'm up that late to catch it. I don't always get an email when they happen, but here are the last couple that I did get emails for:
Database error in vBulletin :
mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: User ******* already has more than 'max_user_connections' active connections
/home1/*****/public_html/members/includes/class_core.php on line 315
MySQL Error :
Error Number :
Request Date : Friday, March 23rd 2012 @ 11:22:47 PM
Error Date : Friday, March 23rd 2012 @ 11:22:47 PM
Script : http://************/mgc_cb_evo_ajax.php
Referrer : http://************/forum.php
IP Address : 72.87.142.139
Username :
Classname : vB_Database
MySQL Version :
And another random one from awhile back:
Database error in vBulletin 4.1.8:
Invalid SQL:
SELECT alb.albumid, att.attachmentid, att.userid, att.caption, att.dateline, att.state, fdt.filesize, IF(fdt.thumbnail_filesize > 0, 1, 0) AS hasthumbnail, fdt.thumbnail_dateline, fdt.thumbnail_width, fdt.thumbnail_height, u.username
FROM album AS alb
LEFT JOIN attachment AS att ON alb.albumid = att.contentid
LEFT JOIN filedata AS fdt ON att.filedataid = fdt.filedataid
LEFT JOIN user AS u ON att.userid = u.userid
WHERE alb.state = 'public' AND att.contenttypeid = '8'
ORDER BY rand(869630)
LIMIT 6;
MySQL Error : Lost connection to MySQL server during query
Error Number : 2013
Request Date : Tuesday, January 10th 2012 @ 08:18:47 PM
Error Date : Tuesday, January 10th 2012 @ 08:20:52 PM
Script : http://************/content.php
Referrer : http://************/usercp.php
IP Address : 74.243.173.27
Username : *****
Classname : vB_Database
MySQL Version :
--------------- Added 1332824941 at 1332824941 ---------------
I sent you a PM
Those database errors are host problems. The first one means that there are most connections to the database then allowed. On a shared host you don't have permission to increase the maximum allowed connections. You can ask your host to increase this limit, but, most shared hosts will not do so.
The second simply means your mysql settings are too limited. The amount of resources needed is more than the amount allowed in your settings.
Your site seems to load fast enough for me. Not slow, not lightning quick. Very typical of a shared host.
michelle86
03-27-2012, 04:31 AM
Those database errors are host problems. The first one means that there are most connections to the database then allowed. On a shared host you don't have permission to increase the maximum allowed connections. You can ask your host to increase this limit, but, most shared hosts will not do so.
The second simply means your mysql settings are too limited. The amount of resources needed is more than the amount allowed in your settings.
Your site seems to load fast enough for me. Not slow, not lightning quick. Very typical of a shared host.
Okay, thanks. These are the kind of errors I sent to bluehost and they said it was a vbulletin issue :P But I was always sure it was them. I asked them to increase my limits already but they wouldn't.
I definitely will be switching hosts in the future when I can afford it, but for now it'll do I guess. I really don't have much choice money-wise at the moment.
That 5.988 second result is inaccurate I think. Not sure if you saw my post above, but I tested your site for comparison and it said it took 6.574 seconds! Of course when I actually visited it, it loaded fine for me. The second test seems to be much more accurate.
Pandemikk
03-27-2012, 04:35 AM
They said it was a vBulletin issue huh? Funny. Some people just like to blame others so that they don't have to deal with your problems. I would advise you to contact support and complain about whoever said that but with BH it won't do any good.
Yeah, I was nowhere close to 6 seconds on your site and I definitely am nowhere near 6 seconds on mine. That site must have some issues they need to fix.
michelle86
03-27-2012, 03:52 PM
So I changed lots of things last night. Disabled some settings. Got rid of quick navigation, member list, customized profiles, VBexperience add-on, as well as other minor things. My members say they have noticed some improvement.
I stayed up all night and never got a vbulletin database error (usually happens every night between 1-4am). So I'm happy with that, but we'll see... might have been a fluke.
Has anyone tried this?
https://developers.google.com/speed/
I just used it today and my score is 64/100. Could be better.
The Page Speed Score indicates how much faster a page could be. A high score indicates little room for improvement, while a lower score indicates more room for improvement. The Page Speed Score does not measure the time it takes for a page to load.
Then it lists, in order of priority, changes I should make to improve my page speed. Based on the results, it's my guess that these are things anyone with a vbulletin forum would also have issues with. Does anyone know how to do these three things?
The high priority items:
Enable compression:
I already did this the other day by enabling gzip html output and using a compression level of 1.... so I don't know how I can improve this further? Here is what it says:
Compressing the following resources with gzip could reduce their transfer size by 145KiB (76% reduction).
Compressing /clientscript/vbulletin_css/style00001l/main-rollup.css?d=1332834548 could save 55.6KiB (82% reduction).
Compressing /clientscript/vbulletin-core.js?v=4110 could save 35.7KiB (70% reduction).
Compressing /clientscript/vbulletin_css/style00001l/cms-rollup.css?d=1332834548 could save 26.2KiB (79% reduction).
Compressing /clientscript/vbulletin_overlay.js?v=4110 could save 10.6KiB (75% reduction).
Compressing /clientscript/vbulletin_lightbox.js?v=4110 could save 8.8KiB (73% reduction).
Compressing /clientscript/vbulletin_md5.js?v=4110 could save 3.4KiB (63% reduction).
Compressing /clientscript/vbulletin_cms.js?v=4110 could save 2.4KiB (59% reduction).
Compressing /clientscript/vbulletin_ajax_htmlloader.js?v=4110 could save 1.2KiB (61% reduction).
Compressing /css.php?styleid=1&langid=1&d=1332834548&sheet=ss_rightcolumn_css.css could save 717B (59% reduction).
Combine images into CSS sprites - I have zero clue on this one:
The following images served from *******.com should be combined into as few images as possible using CSS sprites.
/images/buttons//lastpost-right.png
/images/buttons/search.png
/images/cms/read_more-right.png
/images/cms/widget-forum.png
/images/gradients/selected-tab-gradient-with-top-alpha.png
/images/misc/arrow.png/arrow.png
/images/misc/black_downward_arrow.png
/images/misc/blog/gradient-black-down.png
/images/misc/blog/top-highlight.png
/images/misc/navbit-arrow-right.png
/images/misc/navbit-home.png
/images/misc/unknown.gif
/images/pagination/last-right.png
/images/pagination/next-right.png
/images/site_icons/html.png
Leverage browser caching - also no idea
The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:
/images/buttons/lastpost-right.png (expiration not specified)
/images/buttons/newbtn_middle.png (expiration not specified)
/images/buttons/search.png (expiration not specified)
/images/cms/read_more-right.png (expiration not specified)
/images/cms/widget-forum.png (expiration not specified)
/images/gradients/gradient-grey-down.png (expiration not specified)
/images/gradients/selected-tab-gradient-with-top-alpha.png (expiration not specified)
/images/misc/arrow.png (expiration not specified)
/images/misc/black_downward_arrow.png (expiration not specified)
/images/misc/gradient-black-down.png (expiration not specified)
/images/misc/top-highlight.png (expiration not specified)
/images/misc/navbit-arrow-right.png (expiration not specified)
/images/misc/navbit-home.png (expiration not specified)
/images/misc/unknown.gif (expiration not specified)
/images/misc/vbulletin4_logo.png (expiration not specified)
/images/pagination/last-right.png (expiration not specified)
/images/pagination/next-right.png (expiration not specified)
/images/site_icons/html.png (expiration not specified)
http://www.google-analytics.com/ga.js (2 hours)
--------------- Added 1332869024 at 1332869024 ---------------
Found this: https://vborg.vbsupport.ru/showthread.php?t=267588&highlight=Leverage+browser+caching
Pandemikk
03-27-2012, 04:45 PM
1) Can't really do that on most shared hosts.
2) Sprites are multiple images combined into one large image. This large image should be equal to or, preferably, less than in size than the combined size of all the images it consists of. The reason why this is faster is because it reduces HTTP requests. Browsers have a limit on the amount of parallel downloads they can make, so by combining images into a sprite you can download more things faster. vBulletin does not support CSS sprites atm and it would be a pain in the ass to make a modification that does.
3) http://hellboundbloggers.com/2011/06/03/leverage-browser-caching-to-improve-site-speed/
Google if your friend, especially for number three. :)
michelle86
03-27-2012, 05:10 PM
I did find a mod for css sprites here. Check it out :) https://vborg.vbsupport.ru/showthread.php?t=266696&page=35
I did google for "leverage browser caching" but found someone had issues after doing it: https://vborg.vbsupport.ru/showthread.php?t=272054&highlight=Leverage+browser+caching
So I'm hesitant about that one.
setishock
03-27-2012, 09:13 PM
Do you have cpanel on your hosting? Reason I ask is I enabled compression for everything in the apache settings. My pages loaded pretty quick to start with but after enabling that they're even quicker.
Cpanel > Software/Services > Optimize Website
Compress Content > Select: Compress all content > Update Settings > Logout
See if that helps.
michelle86
03-28-2012, 03:44 PM
Do you have cpanel on your hosting? Reason I ask is I enabled compression for everything in the apache settings. My pages loaded pretty quick to start with but after enabling that they're even quicker.
Cpanel > Software/Services > Optimize Website
Compress Content > Select: Compress all content > Update Settings > Logout
See if that helps.
Should I first disable gzip compression in the vbulletin admincp? (under Cookies and HTTP Header options)
--------------- Added 1332954249 at 1332954249 ---------------
My account has been throttled a crazy amount. So I contacted bluehost.
Here's a snippet of our conversation:
Kevin: [10:18:54 AM] 13354 **** 20 0 180m 20m 8272 R 46.7 0.1 0:00.12 /ramdisk/bin/php5 /home1/****/public_html/****/showthread.php
13841 **** 20 0 175m 15m 7904 R 29.3 0.1 0:00.08 /ramdisk/bin/php5 /home1/****/public_html/****/mgc_cb_evo_ajax.php
14974 **** 20 0 181m 20m 8516 R 24.6 0.1 0:00.11 /ramdisk/bin/php5 /home1/****/public_html/****/mgc_cb_evo_ajax.php
[10:19:05 AM] those are using 46.7%, 29.3%, and 24.6% CPU at the time
Michelle: [10:27:03 AM] i just disabled mgc_cb_evo_ajax.php
[10:27:13 AM] can you already see a difference?
Kevin: [10:35:57 AM] One moment.
[10:38:35 AM] the throttling values are still increaing
Michelle: [10:40:38 AM] is there any other reason why?
Kevin: [10:46:32 AM] you will need to fix the scripts that are consuming so much resources
So I got rid of mgc_cb_evo_ajax.php (which is this chatbox: https://vborg.vbsupport.ru/showthread.php?threadid=168992) which I'm very sad about.
But he says throttling is still increasing.
And showthread.php is using 46.7% CPU? Is this normal? He says I need to fix it, but how???
I don't know if it is relevant but at the time he gave me that number there were 49 people viewing the forum.
setishock
03-28-2012, 04:22 PM
Mine is still sitting at 1. That's the out of the box setting. If all the trouble came after you set the compression in cpanel then go back and disable it.
You really need to back up your database and your home directory. And with all this going on, now would be real good time.
michelle86
03-28-2012, 04:30 PM
Mine is still sitting at 1. That's the out of the box setting. If all the trouble came after you set the compression in cpanel then go back and disable it.
You really need to back up your database and your home directory. And with all this going on, now would be real good time.
I haven't set any compression in cpanel. So it's just been the vbulletin setting. It's probably been throttling like this for some time. I didn't know till the other day when I decided to check. Awful, I know. hahhh
DragonByte Tech
03-28-2012, 10:50 PM
oops
Pandemikk
03-28-2012, 10:50 PM
Gzip compression isn't going to affect your CPU. I highly doubt your CPU usage is that high from 50 people viewing a thread.
michelle86
03-29-2012, 04:51 AM
Gzip compression isn't going to affect your CPU. I highly doubt your CPU usage is that high from 50 people viewing a thread.
I didn't think it would.
What else would be causing showthread.php to use up so much CPU? I have no idea what to do. I've already gone to Settings > Thread Display Options (showthread) and disabled anything there that would affect performance (except the subscription thing).
Pandemikk
03-29-2012, 05:27 AM
Are you showing a shoutbox on showthread?
There's a possibility that bluehost is just lying to you about your CPU usage.
DanHamilton
03-29-2012, 05:28 AM
asmallorange.com are good, Buy a dedicated or cloud server.
michelle86
03-29-2012, 05:50 AM
Are you showing a shoutbox on showthread?
There's a possibility that bluehost is just lying to you about your CPU usage.
No, and I never was. The chatbox was only displayed on the forum home page.
There's nothing on the thread pages other than 3 advertisements (1 at the top, 1 in the first post, and 1 in the last post). They aren't google ads, just affiliate ads I put up.
Not sure if it matters, but I also made it so people have to click to view the quick reply box thinking it might help.
Here's what it says right now in my bluehost account:
Warning
Your account is actively experiencing CPU limiting factors (throttling).
During the past 24 hours your account has been throttled for a total of 26218.478 seconds.
Over 7 hours :erm:
I'm not sure what reason they would have to lie to me. But I'm quite naive when it comes to all this stuff. What's your thinking?
temsamane
02-22-2013, 08:42 AM
Since I am using google pagespeed services, ive got problems with vbulletin cache.
All active members reported me that they cannot login. After entering username and password, they can see redirecting window but after coming again on index page it ask for login again.
Google developer asked me to implement the x forwarded for header. How can i do that for vbulletin?
google topic: https://groups.google.com/forum/?fromgroups=#!topic/page-speed-service-discuss/vjRNft0tjlk
Amaury
02-22-2013, 03:58 PM
Since I am using google pagespeed services, ive got problems with vbulletin cache.
All active members reported me that they cannot login. After entering username and password, they can see redirecting window but after coming again on index page it ask for login again.
Google developer asked me to implement the x forwarded for header. How can i do that for vbulletin?
google topic: https://groups.google.com/forum/?fromgroups=#!topic/page-speed-service-discuss/vjRNft0tjlk
You really should start your own thread instead of hijacking this thread.
vimarc
02-22-2013, 04:08 PM
Is there any product available like wordpress have super caching plugin
Amaury
02-22-2013, 04:24 PM
Is there any product available like wordpress have super caching plugin
Start your own thread regarding this.
mykkal
03-10-2013, 09:34 PM
Michelle, your problem is problably related to not file caching. php really does use a lot of resources to generate a page so you need a caching resource like xcache, APC, or memcache.
Try installaling vBoptimize and see if that works. I use memcache but you'll probably want to use APC since you are shared and have limited access to memory.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.