Author Topic: cpu usage problem due to 4images?  (Read 8031 times)

0 Members and 1 Guest are viewing this topic.

Offline Gwydion

  • Full Member
  • ***
  • Posts: 126
    • View Profile
cpu usage problem due to 4images?
« on: June 26, 2006, 06:24:41 PM »
As someone has posted here I had the same experience that my host suddenly complained about high cpu and memory usage with my account.
I have a quite big gallery, no registered users (meaning there is no need nor option to register to watch/use the gallery). My host could not narrow it down to a certain script but it is either the gallery or the forum. I think it is the gallery.
account data:
Operating system   Linux   
Apache version   1.3.34 (Unix)   
PERL version   5.8.0   
PHP version   4.4.1   
MySQL version   4.0.25-standard

conversion tools for thumbnails: GD
vs. 1.7.1

I would like to know if others had the same problem with 4images. If so, any tips how to fix it?
I will upgrade to 1.7.2, maybe that helps a bit.

I pay quite much for space and bandwidth and now this .. Somehow I think my host just wants to get rid of me *paranoid*

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: cpu usage problem due to 4images?
« Reply #1 on: June 28, 2006, 12:48:34 AM »
1) turn on cache system (you can find more info in docs folder)
2) turn off random image + random category image (in includes/constants.php)
3) if you are using a mod that randomizing new images on home page, then uninstall it.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Gwydion

  • Full Member
  • ***
  • Posts: 126
    • View Profile
Re: cpu usage problem due to 4images?
« Reply #2 on: July 02, 2006, 04:43:02 PM »
Thanks. I did all that including the change of constants.php.
It looks now like this:
// If you have a lot of images in your database,
// the random image function could make your programm slow.
// Try first to set "SHOW_RANDOM_CAT_IMAGE" to 0.
define('SHOW_RANDOM_IMAGE', 0);
define('SHOW_RANDOM_CAT_IMAGE', 0);

Do I have to change anything else to stop random images? Because they are still there.
In the templates maybe?

And something else: I have now enabled cache but the only way to see if e.g. new categories have been added is by deleteing everything in the cache folder.
When I click "clear cache" I get
Warning: opendir(./cache): failed to open dir: No such file or directory in /home/user/public_html/gallery/includes/cache_utils.php on line 129
Cache directory cleared

line 129 seems to be a blank line .. so I have no idea what is to change there.
This refers to vs. 1.7.2
« Last Edit: July 02, 2006, 05:59:54 PM by Gwydion »

 

Post your comments here