I loaded themekey and then installed it after saving the changed list in Modules I got an out of memory error (>32Mb).
Solution for me was to upgrade to 96Mb - I needed to do it anyway, but just thought I'd drop you a note.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 707208_path.patch | 10.12 KB | mkalkbrenner |
| #13 | 707208_path.patch | 10.06 KB | mkalkbrenner |
| #4 | 707208.patch | 984 bytes | mkalkbrenner |
Comments
Comment #1
epersonae2 commentedI believe I may be having a similar problem. Three times now I've attempted to upgrade and had the whole server crash. I have 128M allocated via settings.php.
Comment #2
mkalkbrennerI did some quick tests with some ThemeKey rules and ThemeKey UI. The peak memory usage was always below 32 MB. So it requires some more information about your setup and your current ThemeKey configuration.
Comment #3
epersonae2 commentedI tried again, completely uninstalling ThemeKey v1 and installing v2 (beta 7) from scratch, using all default settings IIRC.
I added about 10 rules, and for 20 minutes or so it worked beautifully. Then -- I'm guessing on a cron run? the server ground to a halt. According to the guys at the colo, there was a runaway process in MySQL that ate up all available memory. It had to be rebooted with Apache off, then I deactivated the module via the status field in the system table, and restarted Apache.
We have a second instance of Drupal on the same server used purely for testing, and it has not experienced this problem at all.
PHP memory usage is set for 128MB.
Comment #4
mkalkbrennerThemeKey itself doesn't implement hook_cron. But here's a patch to turn off ThemeKey when cron runs. Does it solve your problem?
Comment #5
mkalkbrennerComment #6
adrianmak commentedsubscribe
Comment #7
mkalkbrennerPlease provide some feedback to this issue after upgrading to ThemeKey 6.x-2.0-rc2 which contains patch from comment #4.
Comment #8
epersonae2 commentedWill do...am waiting on an unrelated server upgrade before I try this.
Comment #9
Dr Jay commented+1 and I can confirm that I am using the rc2 update with the included patch. Am getting a Maximum execution time of 30 seconds exceeded message and the process keeps respawning.
UPDATE: here is the error:
Comment #10
Dr Jay commentedFor what its worth, the error is kicking up on line 62, which for some reason is resulting in a long (maybe infinite) loop (even increasing max_execution to 60 did not solve the problem:
I don't understand the code well enough yet to tell if the problem is coming from the loop itself (i.e. how large is
count($ancestors);or from the function call to _add_path_ancestors.Comment #11
ManyNancy commentedTheme key really makes my site slow.
Comment #12
mkalkbrenner@Jay Daverth #10:
The line where the error is kicking up doesn't need to be the root cause for the error. It might happen that in this line the memory usage just increased a little but brake the limit (like from 31.999 MB to 32 MB).
Nevertheless this part of the code is suspicious and I'll have a look at it.
@ManyNancy #11:
can you help us be providing some more information like amount of ThemeKey rules and which properties you use.
Comment #13
mkalkbrennerI reviewed the code. I think the current algorithm to detect the values of drupal:path causes the trouble described in this issue.
Unfortunately it takes a heavy patch to use a more efficient approach.
It would be helpful if somebody reviews or tests my patch because such a change is exceptional for a release candidate.
Comment #14
mkalkbrennerFound a small bug in my latest patch. Here's an updated one.
Comment #15
mkalkbrennerfixed a small bug in latest patch and released ThemeKey 6.x-2.0-rc3: http://drupal.org/node/776634
It would be nice if anyone confirms that this issue is resolved.
Comment #16
epersonae2 commentedI should be able to do that within the next two weeks. (Still waiting on that server.) Will definitely post as soon as I know, one way or the other.
Comment #17
ManyNancy commentedRC3 is giving me errors:
Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 65536 bytes) in /vol/www/pressflow/includes/theme.inc on line 1064
RC2 did not, so the new patch has some problems in it, unless there's some upgrade steps that needs to be taken that I was not aware of.
Thanks.
I have 8 rules, 2 node type rules and 6 drupal:paths rules.
Comment #18
ManyNancy commentedEdit: Wait, sorry, problem probably not caused by this module. I tried to set init_theme myself with this module turned off and am still getting this. :(
Comment #19
kfritscheI tried it on our site and it works great.
I added up to 10 drupal:path urls for testing and stop the time themekey needed to detect which rule to take (function themekey_match_rule_childs).
Before the patch it depends on the path length.
For a path like /event/2010/05/21/month/all/all/1 it needed up to 6s (SECONDS!)
For a path like /de/event/2010/05/21/month/all/all/1 it needed up to 27s!
After the patch it needs for all request some microseconds.
So for all, which have trouble and getting a out of memory or execution time exceeded error, should really test the patch (or RC3).
Comment #20
mkalkbrennerComment #22
epersonae2 commentedBTW, I finally had a chance to reinstall ThemeKey on our production server and so far it seems to be working fine.