CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Timeout on Event overview
Pages: [1]

Author Topic: Timeout on Event overview  (Read 1734 times)

BarisArt

  • Guest
Timeout on Event overview
March 26, 2008, 02:49:28 am
http://domain.tld/civicrm/event?reset=1 causes a timeout.

Code: [Select]
Fatal error: Maximum execution time of 30 seconds exceeded in /home/svk/domains/domain.tld/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php on line 570
It worked before (although it took almost 30 seconds to load), but now it won't even load. Is there a way for me to allow the site to load for 60 seconds instead of 30? I tried htaccess and my Drupal template file, but that doesn't work.

Before you ask: we have about 1300 contacts, 100 events and a total 2000 participations.


Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Timeout on Event overview
March 26, 2008, 01:58:12 pm
If you are on a shared server you usually have to contact your ISP & request an increase
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Timeout on Event overview
April 09, 2008, 09:02:39 am
I'm getting a similar behavior. When I click the CiviEvent menu option to view the summary of events, on some installs it's taking quite a long time to load. On one in particular, I regularly get a 500 server error. My php settings are more than adequate. Does that page call some complex queries or something? I've noticed the behavior on several installations (even on my local test server), so I don't think it's necessarily a server issue. It only seems to happen with the CiviEvent page.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Timeout on Event overview
April 09, 2008, 10:20:36 am
Looks like my issue was server related. I still think that page loads slower than most. But it's not as critical an issue as I'd originally thought.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Timeout on Event overview
April 09, 2008, 02:07:59 pm
Ok, I'm still puzzled by this. I've addressed the server issue. And this one page still loads incredibly slow (even on my local testing server). The problem is particularly noticeable on one site, so I was thinking maybe there's some errant data that's creating a problem. But I keep pulling out data and testing, and nothing impacts it. If I have even one event -- with no participants -- setup, the loading speed of this page quadruples. It makes no sense.

I played with the sandbox, created more events and participants, and it doesn't seem to have any problem at all. Anyone have any ideas?
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Timeout on Event overview
April 09, 2008, 02:33:16 pm

the big queries that page runs are:

Code: [Select]
SELECT     civicrm_event.id as id, civicrm_event.title as event_title, civicrm_event.is_public as is_public,
           civicrm_event.max_participants as max_participants, civicrm_event.start_date as start_date,
           civicrm_event.end_date as end_date, civicrm_event.is_map as is_map,
           civicrm_option_value.label as event_type, count(civicrm_participant.id) as participants
FROM       civicrm_event
LEFT JOIN  civicrm_participant  ON
 ( civicrm_event.id = civicrm_participant.event_id AND
   civicrm_participant.is_test = 0                 AND
   civicrm_participant.status_id IN ( 1, 2 ) )
LEFT JOIN  civicrm_option_value ON ( civicrm_event.event_type_id = civicrm_option_value.value )
WHERE      civicrm_event.is_active = 1     AND
           civicrm_event.domain_id = 1    AND
           civicrm_option_value.option_group_id = 14
GROUP BY   civicrm_event.id
ORDER BY   civicrm_event.end_date DESC
LIMIT      0, 10

I'm pretty sure the aboe query returns quite quickly

The other set of queries (to get the contact info) is:
 
Code: [Select]
SELECT
  DISTINCT(contact_a.id) as contact_id, contact_a.contact_type as contact_type, contact_a.sort_name as sort_name,
  contact_a.display_name as display_name, civicrm_event.id as event_id, civicrm_event.start_date as event_start_date,
  civicrm_event.end_date as     event_end_date, civicrm_participant.id as participant_id, civicrm_participant.event_level as event_level,
  civicrm_event.title as event_title, civicrm_participant.status_id as participant_status_id, civicrm_participant.role_id as participant_role_id,
  civicrm_participant.register_date as participant_register_date, civicrm_participant.source as participant_source 
FROM civicrm_contact contact_a
LEFT JOIN civicrm_participant ON civicrm_participant.contact_id = contact_a.id 
INNER JOIN civicrm_event ON civicrm_participant.event_id = civicrm_event.id 
WHERE  ( civicrm_participant.is_test = 0 )  AND  ( 1 )   
 ORDER BY contact_a.sort_name asc 
LIMIT 0, 10

I'm pretty sure the above query is the slow bottleneck query. can you run these to queries on your install using PMA and see the response time

sandbox is on a pretty high end machine and hence is super responsive :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Timeout on Event overview
April 09, 2008, 03:34:15 pm
I ran the queries, and though the second is slower, it definitely is not what I would call a bottleneck.
I don't know what's going on with this. I have other installations which aren't hurting near this bad (though that page is slow). Here's the results on my test server and remote server (same set of data).

Localhost:
Query 1: 0.0015 sec
Query 2: 0.0035 sec
Page load: 1:35:33 (yes, one and a half minutes)

Remote:
Query 1: 0.0032 sec
Query 2: 0.0054 sec
Page load: Timeout/505
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Timeout on Event overview
April 09, 2008, 08:27:42 pm
Lobo the wonder-programmer worked through this today --
There were some inefficiencies in the queries for that page that could significantly impact page load time.

Issue: http://issues.civicrm.org/jira/browse/CRM-2972
SVN fix: http://biryani.osuosl.org:8181/changelog/CiviCRM/branches/v2.0?cs=13929

I ported the three files from SVN back into my 2.0.2 installation and it works beautifully. Big improvement in time to load that page.

-Brian
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Timeout on Event overview

This forum was archived on 2017-11-26.