I am constructing a View display that presents the results of specific vocabulary terms with no node relations. The filter works with just one vocabulary being involved but when I add a second vocabulary filter (with "OR" in effect), the preview times out after 300 seconds.

I am using the 3.0-dev version of Views, the October 30th(-ish) version. I had to switch to the dev version to clean up a disaster with "i18nviews" :p

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/views/view/left_nav_fsg/preview/block_4/ajax
StatusText: parsererror
ResponseText: 
Fatal error:  Maximum execution time of 300 seconds exceeded in /mnt/missioncontrol/clients/SRAM/interactive/sites/sram-d7.gsdesign.com/sites/all/modules/views/includes/cache.inc on line 41

When I turn off preview, this doesn't happen, which is good - it allowed me to get an export of the work-in-progress View, which I've attached here. "Display: RockShox" around line 110 is where I'm adding my filters.

I wish I could provide a stack trace but I'm finding that's difficult for PHP with maximum execution time conditions.

Because I'm working with taxonomies with a limited number of terms (less than 30 each) and no node relationships, even if I'm unintentionally creating a cartesian product for a database result, I can't believe 5 minutes of CPU time would be too little. Is there anyway to see the SQL that Views generates without generating a preview?

CommentFileSizeAuthor
left_nav_fsg.view_.txt7.93 KBjschrab

Comments

dawehner’s picture

Yeah a stack-trace would be awesome. Maybe you could log the current time() - REQUEST_TIME and if it's > 100s and you are in cache.inc push out the stack trace.

Some words about this export i recognized:

$handler->display->display_options['filters']['tid_1']['reduce_duplicates'] = 0;
$handler->display->display_options['filters']['tid_1']['type'] = 'select';
$handler->display->display_options['filters']['tid_1']['vocabulary'] = 'vocabulary_16';
$handler->display->display_options['filters']['tid_1']['hierarchy'] = 1;

You don't filter by tid's here, so there is no need to add this here. Maybe you could try to remove this filter.

. Is there anyway to see the SQL that Views generates without generating a preview?

You could save and then use $view->build() and then (string) $view->build_info['query']

jschrab’s picture

I hope to get some more info on this before the end of the week.

dawehner’s picture

In general this issue looks really similar to #1121926: Contextual filter "Taxonomy term: Name" - Several errors