Concrete5 is slow!

Permalink
A few releases ago my Concrete5 on my site got really slow. I read a few posts on this forum with others having the same issues and most went back to the site's host. I contacted my hosting service and they said it's because of some main Internet route is down or having problems... That was a few months ago -

I have PrestaShop installed in a subdirectory (and using the same MySQL database) that has no trouble loading a page in less than 5 seconds. From Concrete5 I get this after 30 seconds:
This website is temporarily unavailable. Please check back later.
Unfortunately there were no suitable nodes available to serve this request.


So what could the problem be?

dhoeschen
 
bryanlewis replied on at Permalink Reply
bryanlewis
I have had many problems as well with our concrete 5 sites being slow as well. It's by no means a small application. It does a lot and it does it well! (besides the slow factor) I've read in the forum to try APC...

http://www.concrete5.org/community/forums/chat/wow-5-4-apc-fast/...

It does help after having a friend install it for me locally but Its by no means easy for a entry level user to install (I couldn't figure it out). I've been wanting to install it on our latest server but haven't had time nor the guts to do it yet.
hursey013 replied on at Permalink Reply
hursey013
I am by no means an expert in server administration, and in fact installing APC was the first time I've ever even used ssh. If you have a unix based server, you can literally follow these instructions step by step and you will have APC up and running in no time:

http://blog.tech4him.com/2009/12/installing-apc-on-mediatemple-dv-3...

The difference in speed is night and day, and well worth the hassle in my opinion.
Mnkras replied on at Permalink Reply
Mnkras
The main reason why C5 is slow compared lets say wordpress, is the caching.

Wordpress has static html caching which greatly improves performance, and Concrete5 has a file cache by default

a static html cache is slowly comming along but it will probbably be a while
DavidMIRV replied on at Permalink Reply
DavidMIRV
That sounds awfull suspiciously like a Drupal error message..

Or possibly coming from your http server? I'm searching c5 for that string right now
DavidMIRV replied on at Permalink Reply
DavidMIRV
Thats a load balancer error.
dhoeschen replied on at Permalink Reply
dhoeschen
And a "load balancer error" means what? Is there something I need to do or have my host do?

Prior to getting this message I still had slow page load times averaging around 20 seconds per page. I put up with it for quite some time but it's getting old. Imagine editing a page...
dhoeschen replied on at Permalink Reply
dhoeschen
I could ask my host if they could install it but I won't hold my breath...usually what I want effects the whole cloud.
bryanlewis replied on at Permalink Reply
bryanlewis
Working to figure it out...
hursey013 replied on at Permalink Reply
hursey013
You are on (dv) correct? I did not get any errors along the way except where I spelled things wrong. I figured out pretty quick that you can copy and paste those long command line arguments and that eliminated alot of the hassle. Whats the error saying?
bryanlewis replied on at Permalink Reply
bryanlewis
Ok, I just got off the phone with Media Temple and the guy tried those directions after I emailed him the link and he said he couldn't get it to work either.

I've been also trying to use this link.http://www.danmyers.name/wp/2009/08/installing-apc-on-media-temple-...

and this link.
http://php.net/manual/en/book.apc.php...

Every time I copy and paste my ssh commands I get a lot of results! but when i go to check my phpinfo or apc.php I get this response... "No cache info available. APC does not appear to be running."

This is a new server we purchased so that I could test this APC out on it. Anyone willing to help? I would think about changing the password for a bit of support.
hursey013 replied on at Permalink Reply
hursey013
You have modified your php.ini to reflect APC, correct?
bryanlewis replied on at Permalink Reply
bryanlewis
I did number 3 in these directions.

http://blog.tech4him.com/2009/12/installing-apc-on-mediatemple-dv-3...

This is what it looks like now...

; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/lib/php/modules"
apc.so
bryanlewis replied on at Permalink Reply
bryanlewis
Here are a couple of screenshots
hursey013 replied on at Permalink Reply
hursey013
yeah it needs to be:

extension = “apc.so”

not just:

apc.so

Also, after you add that and save, you need to restart apache before it goes into effect. With media temple, typing "web" in ssh will restart it for you.
bryanlewis replied on at Permalink Reply
bryanlewis
GOT IT! That did the trick!!! Sweet! Thanks so much!
hursey013 replied on at Permalink Reply
hursey013
I take you youve uploaded the apc.php too so you can see how everything is running? I had to do quite a bit of tweaking to get it running just right for me. I had to adjust the shared memory size, etc. I will copy my exact setup for you, its what I've settled on after months of messing with it. Are you on the (dv) base or rage?
bryanlewis replied on at Permalink Reply
bryanlewis
Yep I have my apc.php uploaded too. I'm on a DV media temple server.
hursey013 replied on at Permalink Reply
hursey013
here's what i use and it works like a charm:

extension = "apc.so"
apc.enabled = 1
apc.shm_segments = 1
apc.optimization = 0
apc.shm_size = 128
apc.ttl = 7200
apc.user_ttl = 7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1

As I mentioned, this is based on months of research and reading up on APC, and it works perfectly for my configuration. I found that the apc.mmap_file_mask switch was especially crucial, without it, I kept having memory issues. I also host quite a few sites on the server, thats the reason for the high shm_size, if you only have a few sites you could probably get away with 64 or 96 rather than 128.

Let me know if you have any questions, as I said earlier, I'm by no means an expert with this stuff, but I have spent a large amount of time messing around with APC on media temple, so if I can help let me know.
myFullFlavour replied on at Permalink Reply
myFullFlavour
Curious to see your settings and see what info you are getting in APC
bryanlewis replied on at Permalink Reply
bryanlewis
Thanks a million. So I want to get to where I was in terminal and paste all that info in there right? I will do this here in a bit.
hursey013 replied on at Permalink Reply
hursey013
Yeah post in in the php.ini right under the extension = "apc.so" - I copied and paste my settings directly from a terminal window so it should be the exact formatting you need.

and always remember to restart apache to make the changes live.
bryanlewis replied on at Permalink Reply
bryanlewis
Is there a way to double check to make sure c5 is taking advantage of the apc cache. I moved a site from our old host server to our new one with the APC cache set up on it. Then I added

<?php  define('CACHE_LIBRARY', 'apc'); ?>


to my site.php file in my config directory.

I wondering if there is a way to double check to make sure i'm taking advantage of this APC cache
LucasAnderson replied on at Permalink Reply
LucasAnderson
I believe you would know if you change that setting in your config and it's not finding APC. I'm taking a stab here, but I assume it would throw a bunch of errors if you use the wrong cache library.

I had that happen to me when I was just testing that config setting.
nteaviation replied on at Permalink Reply
nteaviation
Yes. use attached apc.php and hit it with your browser.
bryanlewis replied on at Permalink Reply
bryanlewis
ahhh I must be okay then. Thanks for the reply guys!
nteaviation replied on at Permalink Reply 1 Attachment
nteaviation
Sorry, having difficulty attaching php.zip. This is the APC monitor that comes bundled with APC. Log in has been enabled.
Username: admin
Password: admin

You should probably change these in the script :)
hursey013 replied on at Permalink Reply
hursey013
Also, just a note - if you are planning on running multiple sites on the server with apc, you will need to make the modifications listed here:http://www.concrete5.org/community/forums/chat/clear-instructions-t...
dhoeschen replied on at Permalink Reply
dhoeschen
So...any suggestions for my site?
hursey013 replied on at Permalink Reply
hursey013
Similar problem as yours on this thread -http://www.concrete5.org/community/forums/installation/5-4-on-racks... - have you checked that out already?
dhoeschen replied on at Permalink Reply
dhoeschen
I added...

define('CACHE_FRONTEND_OPTIONS', serialize(array('automatic_cleaning_factor' => 0)));


to my config file and was able to login without it timing-out. I then disabled the cache in the settings.

Works a lot better now.
frz replied on at Permalink Reply
frz
Some fairly major tweaks have been made to the latest version of concrete5 to address these performance concerns. To anyone who is interested, you should be playing with the latest build in subversion.

best