4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Gwydion on June 26, 2006, 06:24:41 PM

Title: cpu usage problem due to 4images?
Post by: Gwydion 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*
Title: Re: cpu usage problem due to 4images?
Post by: V@no 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.
Title: Re: cpu usage problem due to 4images?
Post by: Gwydion 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