Charset problem - UTF-8 / Ez Publish slowing down

Author Message

Olivier Vilayphiou

Tuesday 16 October 2007 6:23:34 am

Hi everyone,

I'm having trouble setting up new languages for a website powered by Ez Publish 3.9.1. It's currently hosted on an ubuntu server with Apache 2, MySQL 5.x, Php 4.x and was installed from with the following languages: english, french, german, spanish, italian. Our database is using UTF8_bin encoding, with InnoDB -well, I never really took the time to see how this last parameter was important for basic web based applications-.

Now I've been asked to add 4 new languages: chinese simplified, hungarian, russian and portuguese. I added them without any trouble, creating one siteaccess per languages and configuring the access rights through the admin panel, but there's one thing that tone down the whole thing, it takes hours to load when one tries to switch to one of the 4 new languages I added. Well, not hours, but at least between 10 to 20 seconds, which happens to be like hours with nowadays broadband speed.

I've read and followed all advices I found here:
http://ez.no/ezpublish/documentation/configuration/optimization/configuration_tuning

I checked, our php is running mbstring and it is correctly configured. All charset used are UTF-8. I cleaned the cache several times and there's still no sign of improvement so far.
site.ini.append.php, i18n.ini.append.php and template.ini have all been modified to include UTF-8 as well as all siteaccess site.ini.append.php.

There's also one thing that seems weird to me. I might understand why Chinese, Russian and Hungarian are taking some time to display, though I believe Portuguese use the ISO-8859-1 encoding and shouldn't be falling into the same trouble, or am I completely taking this the wrong way?

Does any of you have any hint to where I'm doing something wrong? Or is it a bug within Ez Publish 3.9.1?

Xavier Dutoit

Tuesday 16 October 2007 8:18:10 am

Hi,

Doubt utf8 is the one to blame...

Could you activate debug and put the result ?

X+

http://www.sydesy.com

Olivier Vilayphiou

Tuesday 16 October 2007 4:08:18 pm

Hi Xavier,

Thanks for taking interest in my case. Unfortunately I can't activate debug as the website is already live and visited. I'd transfer it to my local server but it's going to take me some time. Well, maybe I'll try to do that on my personal server or if I only copy a part of the content and translated pages.

Do you have any idea where it can come from? I'll let you know if I can get the debug output.
Later,

Steven E. Bailey

Wednesday 17 October 2007 7:58:44 am

We have a few multiple siteaccess sites with INNODB utf-8 databases running without any such slowdown...

But, one thing I do with INNODB is set the innodb_file_per_table flag in my.cnf - otherwise you may end up with a huge (multi-GB) ibdata1 file. It's kind of a mess to switch it after the fact as I recall. I'm not sure on a production machine it will matter much or even slow things down.

Another thing that may do it is if the new sites are generating a lot more traffic and all your apache logs are written to one file. If an apache log file is > 2GB it could slow down apache.

The only other thing that I can think of is are you sure that for the new sites ViewCaching TemplateCache TemplateCompile are all enabled?

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Olivier Vilayphiou

Monday 22 October 2007 2:55:56 am

Hi Steven,

Thanks for your time and hints.

So far the new sites haven't been officially announced and don't generate that much traffic, so I don't think it's involved in the slowdown process.

Regarding "TemplateCache", "TemplateCompile" and "ViewCaching", they're all configured and enabled through the main "override/site.ini.append.php". Even if I created new siteaccess, they're only translated versions of the main website and then also depend on the same override configuration file than the others.

As for the innodb trail, I think I'm gonna look into that direction later as I still believe the slowdown is related to the charset conversion.

Thanks again for your help, I'll try to get the debug output this afternoon.
Later,

Olivier Vilayphiou

Monday 22 October 2007 8:19:06 am

Hi,

Here is an extract of the output debug.
I reproduce here only the information that I think is relevant to my problem.

--------------------------------------------------------------------------------------------
Module start 'content'

Error: eZTSTranslator::loadTranslationFile
Could not load translation file: extension/ezwebin/translations/chi-CN/translation.ts

TS translator

Elapsed Percentage Average
TS init 32.7641 sec 93.5679% 32.7641 sec
TS load 31.7678 sec 90.7227% 15.8839 sec
--------------------------------------------------------------------------------------------

Well, I guess I need to upload the chinese translation on the live server then. It's weird because I thought I only needed to put the translation file under "share/translations/language_name-LANGUAGE_NAME".

Another thing that seems quite weird to me, I put this into my siteaccess "site.ini.append.php" file:

[DebugSettings]
DebugOutput=enabled
DebugByIP= enabled
DebugIPList[]=my.ip.address.number
DebugRedirection=disabled

I thought it would only show the Debug output from the IP address listed but the debug show for anyone. How come? Is it a bug or did I misconfigure the whole debug setup?

Of course that's an extra question to my original problem. I'll let you know if upload the translation file solved my problem.

Later,

André R.

Monday 22 October 2007 10:02:06 am

It might be because of the extra whitespace in your ini settings.

Or debug should be disabled globally like DebugByUserId:
http://issues.ez.no/IssueView.php?Id=10708&activeItem=2

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Olivier Vilayphiou

Tuesday 23 October 2007 5:47:27 am

Hi,

Thanks for the hint.I tried it but it still doesn't work. I don't understand why but I guess I'll come back to that point later. I just wanted to tell all of you who helped me that I solved my problem thanks to the debug output, even if I couldn't restrict its display to a user or an ip.

In the end it was just a matter of writing permissions on the translation files stored in the cache directory. Now all the new languages section are loading at the same speed.

Thanks again for your kind help!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.