Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 10:40 am EDT

Geeklog Forums

Geeklog.net having problems?


Status: offline

rjrufo

Forum User
Regular Poster
Registered: 06/14/03
Posts: 95
I was trying to do a search on this site for something I read a while ago, but I keep getting this error:
Fatal error: Maximum execution time of 30 seconds exceeded in /path/to/geeklog/system/classes/template.class.php on line 499
(edited file path)

Just thought I'd let someone know.
 Quote

Status: offline

sammykrupa

Forum User
Junior
Registered: 12/05/04
Posts: 28
Not having problems doing searches here.
Sam Krupa
 Quote

Status: offline

ByteEnable

Forum User
Full Member
Registered: 10/20/03
Posts: 138
Quote by rjrufo:
Fatal error: Maximum execution time of 30 seconds exceeded in /path/to/geeklog/system/classes/template.class.php on line 499


Its a geeklog design error. Whats happening is that your search term has returned lots of results, and its taking the php script longer than 30 seconds to process all the results.

 Quote

Status: offline

ScurvyDawg

Forum User
Full Member
Registered: 11/06/02
Posts: 523

Try refining your searcg parameters down to something less general.
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
I've seen the problem before. It looks a bit silly that such a great system like Geeklog gives such an answer when the search result is too large...
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

rjrufo

Forum User
Regular Poster
Registered: 06/14/03
Posts: 95
I eventually found what I was looking for, but I tried several variations of my search before it stopped having that error. It may be a good idea to increase the timeout to 60 seconds.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
embarrassed
Yes, it's embarrassing, and no, we can't increase the timeout here on the server.

I've spent some time with the search code over Christmas and came up with a few ideas on how to make the search use pagination without breaking the search in plugins at the same time. If I can find the code again (it must be on my iBook somewhere ...) and - more importantly - find the time to put it into CVS, it may eventually make it into a Geeklog release some day ...

I've been wanting to fix this for soooo long ... Embarassed

bye, Dirk
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
Or we should forget the standard search box and only use the advanced search function (or an intermediate search box: select where to search: in articles/forum/files/links). This way people find what they need without searching the complete database. The chances of getting these embarassing timeouts could be reduced by about 95% I guess. Also better for the server load.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

ByteEnable

Forum User
Full Member
Registered: 10/20/03
Posts: 138
If you are php inclined, here is a workaround. This limits story search results to 400. Now, if you have lots of comments, it will break again.

In file:

system/classes/search.class.php

Text Formatted Code

// NOTE if any of your data items need to be links then add them
            // here! Make sure data elements are in an array and in the same
            // order as your headings above!
            while ( ($A = DB_fetchArray($result_stories)) && ($story_results->num_searchresults < 400) ) {
//            while ($A = DB_fetchArray($result_stories)) {
                if (SEC_hasAccess($A['owner_id'],$A['group_id'],$A['perm_owner'],$A['perm_group'],$A['perm_members'],$A['pe rm_anon']) > 0) {
                    // get rows
                    $A['title'] = str_replace('$','$',$A['title']);
                    $thetime = COM_getUserDateTimeFormat($A['day']);
                    $articleUrl = '/article.php?story=' . $A['sid'];
                    if (empty ($urlQuery)) {
                      $articleUrl = $_CONF['site_url'] . '/article.php?story='
                            . $A['sid'] . '&query=' . urlencode ($urlQuery);
                    }
                    $row = array('<img width="8" height="8" src="/images/fpbullet.png" alt=">"> <a href="' .$_CONF['si te_url'] . $articleUrl . '">' . stripslashes($A['title']), $thetime[0], DB_getItem($_TABLES['users'],'username',"uid = '{$A
['uid']}'"));
                    $story_results->addSearchResult($row);
                    $story_results->num_searchresults++;
                } else {
                    // user is not allowed to see this item so don't count it either
                    $story_results->num_itemssearched--;
                }
            }

 
 Quote

All times are EDT. The time is now 10:40 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content