Cache keeps filling up MySQL datebase

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

The reason for filling the cache is to have "indexed" content for the new search. Filling cache content is based on unique URL. So maybe you use diffent kind of URLs or something like that - or additional changing GET values. Maybe check that.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

My real concern is providing a solution for client, since they are pretty simple minded. Namely they would be confused if having made changes to content, they could not immediately view them. Just that simple.

Also a wee bit confusing to me as well. (1.2.5)

config.inc.php
$phpwcms["cache_timeout"] = 0;

site structure (website root level - home page)
cache: (checkbox) X off

article - home page
cache: (checkbox) X off

and as coopersred suggested:

index.php
$cache_update = 0;
$cache_insert = 0;

:( still no luck

To be honest, Oliver, I think this is a great feature, cache control, but I think it needs some polishing. As far as things right now...

even using the 'delete cache' in backend is not resolving this problem.

At the end of the day, the only thing I can suggest to client is to use the CNTRL+F5 strategy inside IE, but I am confused as to when and where the updates appear to site visitors......hmm....

Has the new CVS released adressed this?

cheers
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

I don't understand your post and what you want to say ;-)

What is the problem?

Each time your client is doing a content change in the backend cache timeout is reset. So they will always have updated content and browser refresh isn't neccessary (should be).

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Hi Oliver,

Well basically any change to content in homepage (root) does not immediately show up. Very strange really, since I set all the above settings to completely bypass caching.

suggestions?

site:
http://www.southernmaoribusiness.org.nz/

if I make changes to 'text' in backend to homepage,
they do not display the update in public site..
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

normally this is impossible because each time an update in the backend is done the cache timeout in database is reset. Maybe there is a squid or another proxy responsible for that.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

That is possible, will have to look into that....

I had discussed upgrading to 1.2.6 with Pappnase, but I am guessing that the same situation will occur. Very strange, really. One thing to mention, but I do not think this is related. I set up the site using:

$phpwcms["site"] = "http://unix301.tm136.taylormade.net.nz/";

because the client had yet to decide on a domain name...
now had been changed to:

$phpwcms["site"] = "http://www.southernmaoribusiness.org.nz/";

could this change have affected 'something else' that I am not aware of? ...because during deving under the first site definition (taylormade.net.nz), I do not remember this problem....

the original setup generated $_SERVER['DOCUMENT_ROOT'] as:
/hsphere/local/home/unix301/unix301.tm136.taylormade.net.nz'

but now as far as the server is concerned all files are here:
/hsphere/local/home/southernmaoribusiness.org.nz'

would uncommented the $_SERVER['DOCUMENT_ROOT'] be any benefit?

Just cannot understand this situation.
:D
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

you have to replace DOC_ROOT by current path.

Domain name has nothing to do with it - because system checks always against current URL. So try to empty cache first in admin section.

And it's always good to use:

Code: Select all

$phpwcms["site"] = "http://".$_SERVER['SERVER_NAME']."/";
I will make another change to cached content where a hash will be used to compare against content. Might be better than against URI.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Thanks Oliver...will sort this out

I had a wee question about SSL in Wcms - is it planned to be implemented?

I just posted source (Marcus and Me) of shopping cart and it works except for SSL implementation.

I wanted to ask a BIG favor and have you take a look at functionality.
http://www.gripfast.co.nz/index.php?balls_rugby_union
(unfortunately this cart will be removed later this week)

I posted the source here:
http://intermundi.webbiznz.co.nz/wcms/w ... cation.zip

No where near what you might have in mind, since you did mention a simple cart down the line.
I just wanted to ask if you might lend any info about SSL....
since this hack is ready to go except for this aspect.

Viele Danke,
:D
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

If you need SSL just change

Code: Select all

$phpwcms["site"] = "http://".$_SERVER['SERVER_NAME']."/";
to

Code: Select all

$phpwcms["site"] = "https://".$_SERVER['SERVER_NAME']."/";
Maybe not the best solution - but it is working.

It might also be possible to build a custom workaround to change "https://". Use "frontend_init" for this and make a check against structure level or level ID or whatever.

Maybe working like this:

Code: Select all

if($aktion[0] == 5) { // 5 = structure level ID
  $phpwcms["site"] = "https://".$_SERVER['SERVER_NAME']."/";
} else {
  $phpwcms["site"] = "http://".$_SERVER['SERVER_NAME']."/";
}
or implement a check which redirects to the right protocol.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Thanks Oliver,
the cache issue has been resolved by using:

Code: Select all

$phpwcms["site"] = "http://".$_SERVER['SERVER_NAME']."/";
I wanted to ask a question, regarding the summary interface that uses the FCK 2 Editor. The client has asked for more working area in summary interface in which to add content. (WYSIWYG and Text w/Images are fine). Here is screen capture of summary section (FCK2)

Image


I wanted to ask if you might point me in the right direction towards making this modification, basically increasing its height.

Cheers & Thanks,
:D

UPDATE:
Ok, went in and found it, basically the WYSIWYG array declared in

inc/inc_tmpl/article.editsummary.tmpl.php

$wysiwyg_editor = array(
'value' => $article["article_summary"],
'field' => 'article_summary',
'height' => '550px',
'width' => '440px',
'rows' => '15',
'editor' => $_SESSION["WYSIWYG_EDITOR"],
'lang' => 'en'
);
Last edited by jsw_nz on Mon 14. Nov 2005, 23:26, edited 1 time in total.
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

check cnt1.inc.php

Newest release should have more height there. Check CVS.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

;)

or use the 'Full-Page' Plug-In for FCKeditor -> here

or use my -> Pakage
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Thanks Pico,
I will use it on my next project.
Great contributon to Wcms, btw
:D
shiny
Posts: 56
Joined: Tue 27. Sep 2005, 20:10

Post by shiny »

Just a quick note to mention that I've had this problem on my site, too - I thought that it was my webserver, but after some investigation I discovered that MySQL was hanging when trying to update the 55MB(!) phpwcms_cache table, and killing the site for half an hour at the time until the zombie processes disappeared.

I've applied the fix on the previous page, which should hopefully sort it.
http://www.shinypixel.co.uk - WCMSBlog :: The blogging Module for Phpwcms.
Current version : 0.6 [Public Release] - Includes RSS support
Next Version : 0.7 [Public Release] - will include IP banning and blog entry categories
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

Yep this solve it :D Thanks... I was looking for a solution!!
coopersred wrote:Yes every url seems to be unique

But I seemed to have solved the problem or at least found a work around. In the original index.php file lines 89-92 were set like this:

//db based page caching
$cache_enabled = 0;
$cache_update = 1;
$cache_insert = 1;

and when set like that every page access filled the table phpcms_cache

When I changed lines 89-92 to this

//db based page caching
$cache_enabled = 0;
$cache_update = 0;
$cache_insert = 0;

it stopped my cache from filling up.

Don't know if this will cause me problems but so far so good. Maybe i've found the cache turn off swicth??
http://www.studmed.dk Portal for doctors and medical students in Denmark
Post Reply