Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Cutenews.ru loading very slowly

 
Reply to topic    Forum Index » General feedback View previous topic
View next topic
Cutenews.ru loading very slowly
Author Message
dijares



Joined: 11 Nov 2006
Posts: 40

Post Cutenews.ru loading very slowly Reply with quote
For some reason my cutenews.ru loads very slowly. When I go to sign onto my cutenews, it takes literally about 5 minutes to appear (and this is with a cable modem). And then it will sometimes take just as long when I'm trying to post the news.



I don't know if it's because I have so much data or what. I'm using this program because it can handle the amount of news I have (the original cutenews could not handle the amount of news).



Also, when I'm posting news, it's nearly impossible to get onto my site. It totally locks it up. This is very bad for business when I have many visitors. They'll just go somewhere else.



Can you take a look please?



http://www.harrypotterspage.com



http://www.harrypotterspage.com/news/index.php



Thanks.



Dij
Wed Mar 21, 2007 10:40 pm View user's profile Send private message Visit poster's website
Guest








Please login to hide the ads.

Ramon



Joined: 12 Oct 2005
Posts: 462
Location: Hoogeveen, NL

Post Reply with quote
Do you have some statistics of your database?



Also with the amounts of newsitems that you have it is a good idea to turn cache on(if this isn't already the case). This can be done somewhere in the first few lines of head.php



I think CNR doesn't have any MYSQL indexes set. It might be wise to make a few indexes.



Code:


CREATE INDEX Postdate

ON cute_news (date DESC);



CREATE INDEX NewsID

ON cute_news (id DESC);



CREATE INDEX StoryID

ON cute_story (post_id DESC);





Just run that SQL query and see if it works Smile

_________________


Last edited by Ramon on Thu Mar 22, 2007 1:32 am; edited 1 time in total
Thu Mar 22, 2007 12:08 am View user's profile Send private message Visit poster's website
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
Both seemed to load pretty quickly for me however.. I used to have the same problem til I realized that my /cache/ directories were getting jam packed FULL of files. I deleted them all and my admin panels are moving SO much faster like a brand new cutenews.ru install. Are your /cache/ directories filling up? I noticed on my smaller sites it was never a problem but sites that have 500-1500 content items start to crawl in the administration area.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Thu Mar 22, 2007 12:37 am View user's profile Send private message Visit poster's website AIM Address
dijares



Joined: 11 Nov 2006
Posts: 40

Post Query and Cache Reply with quote
Ramon wrote:
Do you have some statistics of your database?



Also with the amounts of newsitems that you have it is a good idea to turn cache on(if this isn't already the case). This can be done somewhere in the first few lines of head.php



I think CNR doesn't have any MYSQL indexes set. It might be wise to make a few indexes.



Code:


CREATE INDEX Postdate

ON cute_news (date DESC);



CREATE INDEX NewsID

ON cute_news (id DESC);



CREATE INDEX StoryID

ON cute_story (post_id DESC);





Just run that SQL query and see if it works Smile




Where do I run that query? Maybe I'll ask my server guy. I looked at the db, and it's a total of 14.7MB large (my comments are 11.1MB). I have over 35,700 items.



I tried to pull up my cache, and you're right, it's so much, that I finally gave up trying to pull it up (via dreamweaver). When trying to go online to look at the folder, it wouldn't bring it up - finally timed out. Is it safe to delete all the files in that folder? and should I do this like once a month?



Thanks!
Thu Mar 22, 2007 11:23 am View user's profile Send private message Visit poster's website
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
Apparently it is. It's supposed to clear when you hit 'clear cache' but it doesn't do it for me. So, here's what I did to test it and see if this would make a difference..



Rename /cache/ to /cache2/ then create a new empty directory called /cache/ and then try to load your site & admin panel and see if they are faster. If so, that's your problem. Remove /cache2/ and you should be good to go. To stop this problem from happening again, just change the variable at the top of 'head.php' to define('cache', false);



I've been smooth sailing since and have lost 0 news articles.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Thu Mar 22, 2007 1:16 pm View user's profile Send private message Visit poster's website AIM Address
Ramon



Joined: 12 Oct 2005
Posts: 462
Location: Hoogeveen, NL

Post Reply with quote
About my earlier suggestion, if your site is running faster without the cache files. You should overthink switching Cache off, just set the value to false in head.php, you will probably have a higher server load, but pages will load more quickly.



The SQL query you can just run in your SQL admin panel or make a file.



Code:


<?PHP

$link = mysql_connect("localhost", "USER", "PASSWORD")

mysql_select_db('DATABASE_NAME',$link);



CREATE INDEX Postdate

ON cute_news (date DESC);



CREATE INDEX NewsID

ON cute_news (id DESC);



CREATE INDEX StoryID

ON cute_story (post_id DESC);

?>



_________________
Thu Mar 22, 2007 1:20 pm View user's profile Send private message Visit poster's website
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
I don't understand. What does all that stuff do?

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Thu Mar 22, 2007 5:26 pm View user's profile Send private message Visit poster's website AIM Address
Ramon



Joined: 12 Oct 2005
Posts: 462
Location: Hoogeveen, NL

Post Reply with quote
It creates search indexes. So queries take up less time. Can't really explain but it's like creating shortcuts for MYSQL, so it finds it way around the data faster Smile



Selecting news from a database is done by query string like

Code:
Select * From (database)

WHERE date >= #2007-02-01# AND date <= #2007/03/01#




You see how the date field comes in handy to select posts from a certain period. I'm not totally sure though whether CNR does really select on date, it seems obvious but it can also select on ID's that's why I also suggest you index those fields. It also is likely that CNR already has indexes for these

fields but I don't know how to check that. Either way, it will do no harm (re)creating them Wink



If i'm not making it more understandable, be sure to search google for "indexing mysql database" or something like that.



Edit: http://www.w3schools.com/sql/default.asp

_________________


Last edited by Ramon on Fri Mar 23, 2007 12:53 am; edited 1 time in total
Fri Mar 23, 2007 12:40 am View user's profile Send private message Visit poster's website
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
no you made sense. that's awesome. i didn't know about that!



Quote:
be sure to search google for "indexing mysql database" or something like that




I'll also try that. Thanks man. There's so much to learn!

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Fri Mar 23, 2007 12:51 am View user's profile Send private message Visit poster's website AIM Address
asson



Joined: 24 Nov 2006
Posts: 46
Location: Karlstad, Sweden

Post Reply with quote
+

I think that has something to do with your hosting company, I have CN installed on two diffrent servers, one of them (old hardware) loads slowly specially the administration panel, but not so slow to take 5 minutes to load.

the other one on a server with new hardware and loads very quick.

There are almost the same amount of data stored in their databases (Mysql).

Good luck Wink
Fri Mar 23, 2007 11:35 am View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
Mmm that could be too. I always wondered if GoDaddy has some of my sites on a different computer that isn't as good or something cause.. well I have 2 hosting accounts and the sites on my one hosting account.. everything is way slower especially cutenews.ru and on the other it's lightning fast always.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Fri Mar 23, 2007 5:19 pm View user's profile Send private message Visit poster's website AIM Address
dijares



Joined: 11 Nov 2006
Posts: 40

Post Fixed!! :) Reply with quote
Hey guys,



Sorry it's taken so long for me to get back to this. Work two jobs, so sometimes takes a bit to get to this stuff.



It was taking forever to download all the .tmp files in my cache, so finally went via my server and changed the file name. Then made another folder named cache, loaded that up (making sure to include my .htaccess file and CHMOD to 777). Then I changed the chache to false [define('cache', false);] in my head.php file, and now my admin panel loads up in an instant! Woohoo!



I went through many different postings, making sure everything looked good. And they do!



Absolutely wonderful!



I didn't do the server query. I go through Nexcess, who happen to be wonderful, but I wanted to see what this would do first before I bothered my server guys (they're great, but I bother them a lot sometimes, so try to do things on my own first).



Thanks so much!



I guess you can close, and hopefully this info will help others! You're all the greatest! Laughing Very Happy Laughing
Sat Mar 24, 2007 1:40 am View user's profile Send private message Visit poster's website
Display posts from previous:    
Reply to topic    Forum Index » General feedback All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.