Wednesday 11 October 2006 8:09:43 am
Hi,
I have experienced a problem using the texttoimage operator in a clustered environment, using the dbfile filehandler.
The architecture I use is: a webstorage machine, with the database and two frontend machines, serving the pages and retrieving storage and cache from the database, with a remote connection. eZ version is 3.8.4.
The thing is, images created with the texttoimage operator are cached under var/cache/texttoimage/images, in the frontend cache directories.
So, if someone browses a page, say, on the first frontend server, the image is cached there and it appears the <i>information that the image is cached</i> is stored in the DB, somehow. As a matter of fact, when a connection is made on the second frontend server, the image results cached, but the path exists only on the first machine, so the image is broken. I've fixed this, by remotely synching the var/cache/texttoimage/images directories of the two machines every two minutes, but I guess this is quite a crude patch. Another 'fix' could be to set the UseCache setting to false in the texttoimage.ini configuration file. I have tried to browse the source code (lib/eztemplate/classes/eztemplateimageoperator.php) but didn't find any place where the information that the image was alredy created was written in the cache, so I can't figure out how a connection on a second machine would try to load the image directly from the file system, instead of generating it. Is there a way in order to have texttoimage images cached in the DB? Guglielmo Celata
|