Hey there...
I'm working on a multisite installation of drupal 4.7, and it was doin' just fine 'till I found that every page the browser requested took ages to get displayed.
I even contacted my VPS provider and got the RAM increased, but the problem wasn't solved. After many googlin', looking for similar topics on drupal's forums found the devel module, so I'm giving it a try.
The problem seemed to be the (as you might already guessed :-P) locale.module... IT TAKES mysqld TO RUN FOR AGES, eating ALL of the CPU.
Disabled such module, and everything went smooth... all of my sites runs as intended but we plan to offer our visitors a experience in their mothertonge (spanish, in this case), and displaying warns and messages in english wouldn't do for them.
Is there any suggestions to get locales to work?
Comments
Can you please post the
Can you please post the offending queries?
--
Drupal services
My Drupal services
--
Drupal services
My Drupal services
There is a huge report
The report is quite huge (these are huge queries, if they do not appear well formated, maybe I should send them to your email, or post it as a webpage, you tell me)
NaCl+U2 @O2
Do you run the OG module?
Do you run the OG module? We've recently fixed a bug that was seen if you used that module. I think it would also run these queries even if they weren't needed. Can you try upgrading to
http://ftp.osuosl.org/pub/drupal/files/projects/drupal-4.70-cvs.tar.gz
and see if that fixes the issue?
--
Drupal services
My Drupal services
--
Drupal services
My Drupal services
No organic groups
I don't use the OG modules at all, let me upgrade to drupal-cvs and see if that fixes it.
NaCl+U2 @O2
I hope
you meant this:
http://ftp.osuosl.org/pub/drupal/files/projects/drupal-cvs-4-7.tar.gz
Am I right? :-P
NaCl+U2 @O2
4.7-cvs
I just don't know whats wrong, one of my websites runs drupal 4.6 with locales, and it runs smoothly... but it just doesn't seems to work on drupal 4.7
The lag sometimes comes between table locking, so the website comes temporary unavailable for everyone the time lag lasts. After upgrading to cvs, re-enabling locales and importing the most recent .po, the problem seems to be bigger, I'll post the whole log.
Any clues?
NaCl+U2 @O2
SELECT data, created,
SELECT data, created, headers, expire FROM icisoft_cache WHERE cid = 'locale:' <== this looks suspicious
There is no value for $locale set. I'd check where it gets lost.
--
Drupal services
My Drupal services
--
Drupal services
My Drupal services
Same slow down seems to be going on for me, just fyi...
I hadn't thought about table locking... but that may well be it...
Here's some of my sample devel module page dump -- only the > 5ms queries listed...
Any comments or thoughts are appreciated...
Albert
www.ithou.org
Would any of this...
Ok, since this site is on pre-production, and simulating a real environment, would it be a problem if:
a) sites/www2.mysite.net is a symlink to sites/www.mysite.net (real folder), and settings.php pointing to the symlink
b) would it be possible char codes are different? mysql working on utf8, es.po iso8859-1, and system's filesystem on, let's say, utf8?
c) some misconfiguration on .htaccess?
d) shall I grant var pass through modules on php.ini? (security hole)
Tell if there's something I can help with
NaCl+U2 @O2
check this...
http://drupal.org/node/65801
Albert
www.ithou.org
locale.module performance
Hi, I have (had) a similar problem with the locale module.
After some investigation i found that the query was not efficient enough - i had up to 10000 translations loaded. The database is MySQL 4.0.18 which means that there was not index on the locales_source.source column.
All the queries of the locale module access this column.
The workaround I did was to
- add a new column to the locales_source table called 'alias' of type varchar(255)
- created an index on this column
- update locales_source set alias = substring(source,1,255)
(This update has to be done everytime you load some .po files, but if you have a stable site that would not be the issue).
- changed the queries in the locale.module eg.
$result = db_query(
"SELECT s.lid, t.translation ".
"FROM {locales_source} s INNER JOIN {locales_target} t ON s.lid = t.lid ".
"WHERE s.alias = substring('%s',1,255) AND t.locale = '%s'", $string, $locale);
This workaround works fine. But there seems to be also a bug in the locale cache. If anyone has some more info on that that would be helpful.
Hope that helps, Willi