I got a VPS with the following specs:
CPU: 4 cores
RAM: 8192 MB
Harddisk: 300 GB
I got direct admin installed on it (VPS Came with it) and I uploaded a site to it … so far so good!
now the problem im facing is that the webserver is extremly slow, The website takes ages to load (www.ictaanbieding.nl)
I tested it on http://www.webpagetest.org and Everything seems fine exept for First Byte Time
I have no idea what to do here, I hope you guys can help me out ! :injured:
First thing I’d personally do, is rule out any programming. Place a static simple page as your index.html or whatever your default loading page is, and run your test again. If it still takes forever and a day, then you know it is a network/server setup issue. If it takes a split second and gives you an A, then you know you need to look internally at the application/program that runs your site. Maybe it is your database connection (for example), or a poorly written section of code.
Are you using localhost as your connection string for your database? Or are you using a DNS entry? If a DNS entry, do you have a entry in your /etc/hosts file that indicates the DNS entry should be pointed to 127.0.0.1 (since they are on the same machine)?
Please note, don’t point your domain name to 127.0.0.1 unless you want your site to be unreachable. If you are using mysql.domainname.com then I’d have that in your /etc/hosts file pointing to 127.0.0.1 (unless you need outside resources hitting it). If you need outside resources hitting it, using localhost to connect to your database.
okay, now to start to rule out your opencart queries.
I’d ensure slow_query_log is enabled, access your homepage and then execute mysqldumpslow to review if any of the queries are not performing very well.
If that all looks good, I’d turn my attention to any third party sites your site may be accessing, as they may be slowing it down.
I fixed it or atleast made it load a lot faster (it was 20 seconds) its 1.834s now wich is still a big F
Found a xml file, made a backup of it and deleted it as it wasnt a original opencart file. after this it speeded up!
Image compression? Images are already compressed. You are not attempting to compress them again, are you? I didn’t see any evidence of that, but I have to ask.
Your main page has 50 requests. That is a lot, but not the root of the problem. tools.pingdom.com indicates the wait time to receive the HTML of your index page is over 20 seconds. That’s some of the worst performance I have ever seen outside of a shared host I used years ago. On the first load, all of your files took a long time to be transmitted, including the images, CSS, and JS. On secondary loads, the HTML still took over 20 seconds to be received but the linked in files took less time. That seems to indicate the bottleneck is in the page generation somewhere.
Are you running any type of PHP accelerator? It looks like you are using PHP 5.3 which was released in 2009 and for which support will end in July 2014. You should consider upgrading to PHP 5.5 if your code will allow it. Significant improvements in performance have been made since 5.3. Plus, 5.5 has an available opcode cache that can help improve performance. But I don’t think that will help in your situation.
For now you must simplify. Turn off output compression for starters and any other special, non-essential configuration features. If that doesn’t help, you will have to start profiling your code and database queries to find where the trouble is. You have a powerful VPS. No way should it take this long to load a page.
Right after I posted this I saw the original poster’s reply and tested his site again. The main HTML load time has declined from 20 seconds down to 0.723 seconds. I think the OP fixed it.
Hehe, I think you missed a post or two He found the bulk of his time due to an XML file, once that was removed, it dropped to a 1 second load time However, there is still the 50+ requests being loaded, and that may be the issue at hand now. There is also the 404 on the favicon.ico that will add time as well. Just create a blank favicon.ico (if you don’t have one already, so you can get rid of the 404).