Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Gabriel Petrelli Posted July 1, 2010 Posted July 1, 2010 I'm having an issue with my vps and page generation spikes. When I load the gallery or the index, most of the time it's the gallery, php takes between 1 - 6 seconds and sometimes more to generate the page. The server load also spikes without any increase to traffic, I usually only ever have between 30 - 40 guests and 1 - 3 members online at a time without much posting, searching occurring at the time of these weird spikes. PHP page generation was never an issue on my old shared host, usually it only ever took between 0.3000 - 0.6000 seconds to generate a page on my old shared host, no more than that. If anyone could help me solve this issue that would be greatly appreciated. :)
Gabriel Petrelli Posted July 9, 2010 Author Posted July 9, 2010 Just wondering if there is anyone experienced with server management that can offer some advice or help, this is still an issue for me on my VPS.
Gabriel Petrelli Posted July 9, 2010 Author Posted July 9, 2010 When I try to perform some actions on my forum I also get server 500 error pages sometimes.
Gabriel Petrelli Posted July 11, 2010 Author Posted July 11, 2010 I really need help, server load and page load/generation times are spiking and it's even causing my forum to be inaccessible at times.
markopolo2002 Posted July 12, 2010 Posted July 12, 2010 I probably can't help that much, but I'm generally having the same issues although when I tried loading your portal it took something like 10-15 seconds to fully load. The problem most of us are now facing is a massive increase in page load times, and as a consequence people leaving in droves whilst at the same time we're being told our hardware needs upgrading. Problem is for us, as more people bin our site our revenue just goes from bad to worse meaning we've no chance of being able to afford what we had in the first place, let alone upgrade to bigger hardware!. Unless something is done pretty fast regarding resource useage we're going to see the death of a lot of previously busy and thriving sites me thinks!. For me also, our site's load can sit pretty at around 0.3 upto around 0.9 and then all of a sudden and without reason it just goes nuts and starts climbing to 2, 3, 4 upto 5 when everything basically just stops responding until it comes back down again!. I've stopped asking questions on the forums to be honest cause it's rare you get a response - sorry to be so negative but it just always seems we're up against it all the time these days. I did read somewhere that there was a resource issue (quite possibly not related to ours) that would be addressed in 3.1.2 so it may be worth hanging on until then :) Out of interest Gabriel who's your host?
Gabriel Petrelli Posted July 12, 2010 Author Posted July 12, 2010 Yeah, I'm getting spikes as high as 13 seconds to 25 seconds. I never remember having this issue on my former shared host, page generation or load times always stayed around 0.3000 - 0.6000 seconds, I was hoping that by moving to a VPS I would see improvements and not further degradation. I think there is something wrong with my PHP, Mysql, and Apache configurations. :hmm:
markopolo2002 Posted July 12, 2010 Posted July 12, 2010 Sometimes the irony is that shared machines have more CPU's and memory and where those sharing it with you are only small, non busy sites you could be on to a winner, then you move to a VPS which has less CPU and memory power but you're guaranteed a slice of that power which could be less than the shared bag on the shared server!. If and when we manage to repair the damage being done to our site and start making a couple of quid again we'll be going down the dedicated route, at least then we know what we're getting and the guesswork is more or less taken away!
Gabriel Petrelli Posted July 12, 2010 Author Posted July 12, 2010 It's too bad I can't afford dedicated, also I don't consider my site to be at the point where dedicated would be necessary. My site isn't very busy so I presumed that a vps would be sufficient for my needs. Some vps plans get about as expensive as dedicated plans so I thought that maybe a vps would be about equal in power and performance. :Edit: My host also hasn't been very helpful to remedy these spikes. I try to tell them that the spikes are both random and brief and by the time I try to find out what is causing it the spikes subside. Performing some actions on my site such as database related queries, optimizing the database, repairing the database from IPB itself throws out server 500 errors.
Gabriel Petrelli Posted July 12, 2010 Author Posted July 12, 2010 I apologize for posting twice but I think I may found what is responsible. It seems some queries are more heavy that others, for instance most of my pages load in no more than 0.3 - 0.4 seconds, however loading some forum sections and threads will cause this to jump to 1.0 second and sometimes as most as 13 - 25 seconds. Some pages such as my download system load in 0.1 seconds, so it seems there may be some slow or dirty queries that are causing spikes in the software. :Edit: These spikes might not be as noticeable for those with powerful dedicated or shared setups, but for those on lowly vps hardware there tends to be spikes that are at times unbearable, mostly related to PHP/MySQL queries.
Collin1000 Posted July 12, 2010 Posted July 12, 2010 What are the specs on that VPS box? You have to remember that up until very recently, the entire IPS community site was run on a standard VPS setup. I ran an IPB site on a super oversold shared server and never had issues, and I currently run one on another shared host and have no issues there either. Since this is a VPS box, I assume you have root access. I would suggest you go in and install some type of monitoring program (more advanced than just the shell "top" command) that can monitor what scripts are causing the load, and diagnose those.
Gabriel Petrelli Posted July 13, 2010 Author Posted July 13, 2010 It has 512 MB non-burstable ram, I'm not sure about the CPU other than something that states it has 8 cores which I presume is for the whole box and not vps.
markopolo2002 Posted July 13, 2010 Posted July 13, 2010 To be honest, I've looked through most of these threads myself and tried tweaking the my.cnf, php.ini and all other manner of tweaks to death and nothing really makes a difference!. One question which may be worth asking though is if you've enabled the server stats (as I have on the front page) and we notice a lengthy delay in the page load and the stats on the front page show something like 8 seconds load time, is this the host that took that amount of time to return the page or can it be attributed to the ISP we're using. Just a little food for thought!.
markopolo2002 Posted July 13, 2010 Posted July 13, 2010 Gabriel, I just registered for your site and looking at your stats on the front page (portal) I see you're using 30-31 queries for the portal alone. Given this would be the same for everyone hitting your front page it's probably no surprise your pages are loading pretty slow. I was concerned that our front page was using something like 16 queries, but we're using IPContent and can cache that stuff to an extent which at least takes a little of the pressure from the system but unless your portal is cached you'll be generating a massive amount of queries when 10-20 people hit the front page mate, and it all adds to the overheads on the site. Reloading your portal doesn't seem to take as long as it does initially, therefore I'm not sure if it's my browser caching the stuff or the portal can be cached, but I'm definately still seeing around 30 queries on each refresh :thumbsup:
Gabriel Petrelli Posted July 13, 2010 Author Posted July 13, 2010 I'm not sure why everything is using so many queries. The portal page and the index usually load pretty fast, nearly all the time. The spikes happen when navigating to specific forum sections, threads, and even the gallery. On occasion it will affect other pages as well, but not as often as the pages I just mentioned. Last night my page load/generation time spiked up to 24 seconds, and server load jumped to 1.50 - 2.00. I'm also getting server 500 errors when performing certain actions on my forum. I registered a test account and received a server 500 error, performance a database optimize or repair from the SQL toolbox in the ACP produces a server 500 error nearly all the time, and there are other things as well that produce server 500 errors. The vps is using mod_security and other security features, except Suhosin and SuPHP. My PHP/Apache configuration is set to use FastCGI, eAcclerator, IonCube Loaders, SourceGuardian Loader, mod_bandwidth and other modules/extensions. Here is the extensions that are being used for my PHP configuration:PDO, Reflection, SPL, SQLite, SimpleXML, SourceGuardian, Zend Optimizer, bcmath, bz2, calendar, cgi-fcgi, ctype, curl, date, dbase, dom, eAccelerator, exif, filter, ftp, gd, gettext, hash, iconv, imagick, imap, ionCube Loader, json, libxml, mbstring, mcrypt, mhash, mime_magic, mysql, mysqli, openssl, pcre, pdo_mysql, pdo_sqlite, posix, pspell, session, soap, sockets, standard, tidy, tokenizer, uploadprogress, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib Other software that is installed is Sphinx and RkHunter. There are two other sites that are hosted on the vps, a static html site and another forum/site using MyBB and Silverlight, but they aren't nearly as active as my forum is.
markopolo2002 Posted July 13, 2010 Posted July 13, 2010 Hmm, I'm beginning to feel not quite as bad now after hearing your setup, I'm running 4 MySQL sites on my VPS which are pretty well all used, I still get spikes but given I'm running 2 forums and 2 other download sites I reckon I'm probably doing pretty well considering!. If you're getting issues when in the ACP I'd definately address this with the host, that's one thing you just definately shouldn't be getting - could even be some of your timeout settings need adjusted, but I would certainly be asking the host to do something about it. Cheers Marko ==edit== Ah, another thing also Gabriel, I see your using both the shoutbox and arcade, both will take up a lot of resources, I had the arcade on the site in the beginning and had to take it off because of resource useage, that was when I was on a shared package mind you, but nevertheless it's my understanding these things do take up A LOT of resources. If possible, try even disabling them for a few hours and watch your resources, see if that helps!.
Gabriel Petrelli Posted July 13, 2010 Author Posted July 13, 2010 Hmm, I'm beginning to feel not quite as bad now after hearing your setup, I'm running 4 MySQL sites on my VPS which are pretty well all used, I still get spikes but given I'm running 2 forums and 2 other download sites I reckon I'm probably doing pretty well considering!. If you're getting issues when in the ACP I'd definately address this with the host, that's one thing you just definately shouldn't be getting - could even be some of your timeout settings need adjusted, but I would certainly be asking the host to do something about it. Cheers Marko ==edit== Ah, another thing also Gabriel, I see your using both the shoutbox and arcade, both will take up a lot of resources, I had the arcade on the site in the beginning and had to take it off because of resource useage, that was when I was on a shared package mind you, but nevertheless it's my understanding these things do take up A LOT of resources. If possible, try even disabling them for a few hours and watch your resources, see if that helps!. I had the arcade and shoutbox back when I was on shared hosting without a problem, these don't see much usage and basically just sit idle. I managed to get a screen of top processes when the spikes occurred, PHP and MySQL seem to be the culprit, my account is listed for the PHP process while the default mysql user is listed for MySQL. The processes are chewing a significant amount of cpu and memory.
Collin1000 Posted July 13, 2010 Posted July 13, 2010 ==edit== Ah, another thing also Gabriel, I see your using both the shoutbox and arcade, both will take up a lot of resources, I had the arcade on the site in the beginning and had to take it off because of resource useage, that was when I was on a shared package mind you, but nevertheless it's my understanding these things do take up A LOT of resources. If possible, try even disabling them for a few hours and watch your resources, see if that helps!. I had the arcade and shoutbox back when I was on shared hosting without a problem, these don't see much usage and basically just sit idle. I managed to get a screen of top processes when the spikes occurred, PHP and MySQL seem to be the culprit, my account is listed for the PHP process while the default mysql user is listed for MySQL. The processes are chewing a significant amount of cpu and memory. The shoutbox is a huge resource hog if left unchecked. It constantly refreshes and makes DB calls. I would suggest disabling all addons to narrow down the cause. Also, are you running iArcade? Ive done *extensive* load tests on both a VPS and Shared setup with iArcade and found no issues with it. Very light on query generation.
Gabriel Petrelli Posted July 13, 2010 Author Posted July 13, 2010 No, I'm using IbProArcade right now which is Ioncube encoded. None of these see much usage and I believe I've configured the shoutbox for minimal resource usage. What server monitoring software would you recommend I install that can trace the resource consumption to the actual script that is causing the spikes? I tried Munin, but it seemed a bit confusing and didn't display the information I needed. I tried contacting my host, but they haven't been much help. By the time I submit a ticket or reply the spikes subside.
Collin1000 Posted July 13, 2010 Posted July 13, 2010 No, I'm using IbProArcade right now which is Ioncube encoded. None of these see much usage and I believe I've configured the shoutbox for minimal resource usage. What server monitoring software would you recommend I install that can trace the resource consumption to the actual script that is causing the spikes? I tried Munin, but it seemed a bit confusing and didn't display the information I needed. I tried contacting my host, but they haven't been much help. By the time I submit a ticket or reply the spikes subside. I can't offer much help with ibparcade :whistle: If you are confident that IPB is not the issue (you seem it) try looking into something else run awry. For example, my dev VPS normally has a load of 0.1 or less, but when cPanel's nightly backups run, the load goes to around 2.0 for about fifteen minutes. Something could be server-side causing the spikes.
Gabriel Petrelli Posted July 13, 2010 Author Posted July 13, 2010 To be honest I am not sure what the issue is. I'll try disabling hooks and modifications so I can try to narrow down the issue a bit. I'm not using many modifications or hooks, but a few of them were IPB 3.0.x compatible, perhaps it may be one of them.
Fishfish0001 Posted July 13, 2010 Posted July 13, 2010 What else do you have running on your website, if anything else?Have you tried purging the avatar buffer? (lulz) It might be a good idea to raise a ticket with IPS and they can see if there is anything that might be causing the issue that you might have missed. Also, some members reported that setting up the cookies right can help reduce load, not sure what steps you've taken from the IPB ACP to reduce CPU usage and load.
markopolo2002 Posted July 13, 2010 Posted July 13, 2010 It's always a game of cat and mouse as far as resources go but from what I've experienced and from what you say it generally always is a MySQL issue, have you tried messing with your my.cnf file at all?. There are other 'sample' files available, I was using the smallest one by default but I changed it up to a larger config and it helped, didn't really stop the spikes but I've been running better since :) Marko
Gabriel Petrelli Posted July 13, 2010 Author Posted July 13, 2010 What else do you have running on your website, if anything else? [s]Have you tried purging the avatar buffer? (lulz)[/s] [s] [/s] It might be a good idea to raise a ticket with IPS and they can see if there is anything that might be causing the issue that you might have missed. Also, some members reported that setting up the cookies right can help reduce load, not sure what steps you've taken from the IPB ACP to reduce CPU usage and load. In the IPB ACP everything is tweaked for best performance except a few settings, but I don't think those settings would be causing these spikes. Besides the extensions I've listed I have no additional software except for Sphinx and Rkhunter. Cookies for the board are also properly set, so I don't believe cookies are an issue.It's always a game of cat and mouse as far as resources go but from what I've experienced and from what you say it generally always is a MySQL issue, have you tried messing with your my.cnf file at all?. There are other 'sample' files available, I was using the smallest one by default but I changed it up to a larger config and it helped, didn't really stop the spikes but I've been running better since :) Marko I've tried messing with my.cnf without much improvement, unfortunately I'm not that experienced. I recently requested to my host to tweak MySQL/my.cnf for lower resource usage and best performance. It seemed to help a bit, but spikes are still persistent.
markopolo2002 Posted July 13, 2010 Posted July 13, 2010 Personally if I were at your stage Gabriel I'd be checking out alternative hosts to be honest, if your having issues even in the ACP I'd be a tad miffed to say the least. Only other suggestion as was said before to raise a ticket with Invision and ask their advice, generally speaking they can usually offer at least some advice to the issue as it's one on one with tickets - I'd do it sooner rather than later before 3.1.2 is released as tickets generally tend to go through the roof on these releases. At least that way you'll hopefully have a better idea of what you're looking at, then you can plan accordingly. Marko
Gabriel Petrelli Posted July 14, 2010 Author Posted July 14, 2010 I just submitted a ticket for the issues I've mentioned in this thread, and other issues, just awaiting someone from support to have a look now. :)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.