Help Desk

Performance Issue

  • Posts: 41 Topics: 20
    | Permalink

    For over a week now I have been struggling with a performance issue on our server – a dedicated box with four processors.
    The issue manifests itself by hogging CPU resource which leads to our sites (for there are addon domains beneath the hosting account belonging to other companies in our organisation) being either in accessible (error: Unable to reach site) or returning database errors (error: Unable to connect to database).

    In many cases I have not been able to access the server via either cPanel or WHM and have had to ask our hosting company to re-boot the server on our behalf.

    In attempting to resolve the issue I have stripped the core site back to its bare components, including the Twenty Seventeen theme. As our site is an live entertainments site, The Events Calendar is the very core of its existence. Sadly it would appear that by deactivating TEC the problem goes away.

    As an entertainments site we do have a high volume of events – approx 3,000 in total.

    Are there any known performance issues with TEC with so many events? Obviously if we cannot resolve this issue I will have to look at an alternative solution.

    Posts: 41 Topics: 20
    | Permalink

    UPDATE – over the weekend I re-enabled the basic (free) version of TEC and The Filter Bar and now seem to have a working website. Our site is used to gather event data for our monthly printed magazine and relies on users using the pro aspects and Community Events functionality.

    I have created a workaround to enable user to add data to a table from which our admins can add the data to TEC because this week is our print deadline for December. Obviously this cannot continue. Below is shown the state of TEC plugins when we were experiencing problems and the current setup:

    Plugins active when experiencing performance issues and site crashing:
    ACTIVE – The Events Calendar
    ACTIVE – The Events Calendar PRO
    ACTIVE – The Events Calendar: Community Events
    ACTIVE – The Events Calendar: Facebook Events
    ACTIVE – The Events Calendar: Filter Bar
    ACTIVE – The Events Calendar: List Venues/Organizers Shortcodes
    NOT ACTIVE – The Events Calendar Category Colors
    NOT ACTIVE – The Events Calendar: Month View GigPress Integration

    Current situation, site not crashing:
    ACTIVE – The Events Calendar
    ACTIVE – The Events Calendar: Filter Bar
    NOT ACTIVE – The Events Calendar PRO
    NOT ACTIVE – The Events Calendar: Community Events
    NOT ACTIVE – The Events Calendar: Facebook Events
    NOT ACTIVE – The Events Calendar: List Venues/Organizers Shortcodes
    NOT ACTIVE – The Events Calendar Category Colors
    NOT ACTIVE – The Events Calendar: Month View GigPress Integration

    Posts: 3271 Topics: 4
    | Permalink

    Hi Tony!

    Thanks for getting in touch with us.

    I’m really sorry you are experiencing performance issues. We are currently not aware of any performance issues with our plugins, so let me try to help you with this.

    3000 events is a pretty big number of events to consider when dealing with performance issues. In addition to that, could you please let us know how many venues and organizers you currently have?

    In which pages did you get the database errors? Could you please enable WP_DEBUG and WP_DEBUG_LOG? This will create a debug.log file inside the /wp-content directory.

    After that, try reproducing the database errors a few times, so they will be saved into the debug.log file. Please share that log file with us so we can see if any problem from there.

    We have a great article that will get you started on Performance Considerations you should know about. After that, if you decide to implement a caching system then you can move to these articles: Caching: What, when and how and Caching month view HTML in transients

    Finally, there is a good article George put up here that groups a set of developer plugins. It’s a bit more technical than the others but will definitely be of help if you are into development.

    Let me know how that goes.

    Thanks,
    Victor

    Posts: 41 Topics: 20
    | Permalink

    Thank you for your response Victor.

    We have 2,670 venues and 2,845 organisers. We use organisers as performers/bands hence the high number and our venues were imported from a legacy system – approximately 1,000 would be current active venues.

    Whilst I fully understand your need to see the debug logs in order to help evaluate the issue. From a practical point of view my doing so AND activating the deactivated plugins will crash my site. I will have to attempt to do this when it will have the least impact on our users. Because our site is a key part of our printed magazine’s production cycle (and this is our December deadline week) I will have to choose my moments carefully. This may take time.

    Although I do now have a test site, it sits on the same server as the original so crashing that is an equally bad idea!

    If OK with you, I will leave this thread open and keep you updated once I can get you some usable data which may help resolve this issue.

    Thank you
    Tony

    Posts: 3271 Topics: 4
    | Permalink

    Hi Tony!

    Thanks for following up with this.

    The number of venues and organizers is also significant in terms of performance as they all add to the number of records in the posts table of your site’s database.

    I understand your situation of not being able to test things on the live site. Setting up a dev/staging site would be the best approach on this situations, but I’d recommend you don’t use the same server as your production site. You can always set up a local environment or maybe ask your hosting provider about this. I know many hosting providers offer staging environments for your live site.

    Let me note that enabling WP_DEBUG and WP_DEBUG_LOG will not impact your site’s frontend. This will only create the debug.log file for errors and warning that might be present in your site and can provide very helpful information to find the source of the database errors you are getting.

    If you are using a shared hosting, you might want to consider using a VPS hosting so you don’t have to share resources with other sites on the same server.

    We also encourage you to make a full <u>backup</u> of your site, both database and files so in case something goes wrong you can always restore your site.

    We can totally leave this thread open so you can come back when you have the time. We are always here to help. Bear in mind the thread will auto-close after 3 weeks of inactivity, in which case you can open a new topic referencing this one, and we’ll continue with the topic.

    Don’t hesitate to ask any follow up question you might have.

    Best,
    Victor

    Posts: 41 Topics: 20
    | Permalink

    Hi there,

    Sorry for the delay in following up on this. I have taken some time to investigate the DEBUG.log file and removed some plugins that were causing minor issues. We also had a database table in need of repair, this has been done. I have re-enabled TEC Pro and Community Events as of 8pm last night and left the site running with debug set on.

    The debug file is attached – system wouldn’t allow me to upload .log or .txt files so you should be able to read the attached .jpg (!) file if you rename it to .log (If that doesn’t work let me know and we’ll find another way of doing it!)

    To my untrained eye there seems to be an Events Calendar related recurring error “WordPress database error Unknown column….” but I will let you confirm if this may be relevant.

    That our site has remained up since re enabling TEC Pro is encouraging, but the real test will come later this morning when users start to access it. Any help in interpreting the log file would be much appreciated.

    Thanks in advance.

    Tony

    Posts: 41 Topics: 20
    | Permalink

    Our site crashed out about 7:20am this morning. I had our host reboot the server and carried on adding events, once again it crashed out at about 9:20am.

    I have deactivated TEC Pro and Community Events – whilst not having any detailed proof that these are the cause, from experience by de-activating the site remains stable. It may of course be that TEC is merely exacerbating another issue and is merely a symptom and not the problem!

    I attache the DEBUG.log file from the period during which we experienced the server crashes. Your comments would be appreciated in our attempt to resolve these issues.

    Thanks in advance

    Posts: 3271 Topics: 4
    | Permalink

    Hi Tony!

    Thanks for making those tests and for coming back with all those comments.

    Unfortunately, I do not see the debug.log file attached. Could you please send it to us in a zip file? If that is not possible, then you can simply copy and paste the logs in a private reply.

    Let me note that the latest version of Events Calendar PRO 4.4.19 included some changes in the code that we later found that still need some improvements in terms of performance. So for the time being, I suggest you downgrade to the previous version of Events Calendar PRO 4.4.18. Here’s a guide on how to downgrade a plugin > https://theeventscalendar.com/knowledgebase/downgrading-plugin-past-version/

    Please let me know about the debug.log file as it might point us into finding the source of the problem.

    Thanks,
    Victor

    Posts: 41 Topics: 20
    | Permalink

    Thank you Victor, will attempt to attach a zip file it is an extract of the whole 18Mb file showing only today’s events, if you need more please ask. I will also downgrade the PRO version and let you know the result.

    Tony

    Posts: 41 Topics: 20
    | Permalink

    I have downgrade to TEC Pro 4.4.81

    I am also running TEC 46.6
    Community Events 4.5.8
    TEC Filter Bar 4.5.1

    Can you confirm that these four versions are compatible please, thanks in advance.
    I will lave the site running and let you know if we have any further crashes.

    Thank you for your help.

    Tony

    Posts: 3271 Topics: 4
    | Permalink

    Hi Tony!

    Thanks for coming back with the error logs.

    The plugin versions you are currently using are fine. As a rule of thumb, you should always try to stick to the latest versions of our plugins available. In your particular case though, using TEC Pro 4.4.18 is the best choice and should not present any conflicts with the rest of the plugins.

    As for the error logs, I could see many database errors like ‘PHP Warning: mysql_connect(): Too many connections…‘ and ‘WordPress database error Lost connection to MySQL server during query…

    It seems that the cause of the problem relies in the database. ‘Too many connections’ indicates that your site is making too many connections to the database. You could verify if you have a high volume of traffic in your site or a DDoS attack amongst other reasons.

    I suggest you get in touch with your hosting provider to see if they can offer some insight about this. If you are on a shared server I would also recommend you try to switch to a VPS.

    I hope that helps. Let us know how that goes and if you have any follow up questions.

    Best,
    Victor

    Posts: 41 Topics: 20
    | Permalink

    An update on where we are. Since downgrading to 4.4.18 (not 81 as I mis-typed previously), we have not experienced any performance issues or site crashes. On checking the debug log I also notice that the PHP ‘too many database connections’ errors have also stopped happening.

    I notice that 4.4.20 is now available but, as you might suspect, I am reluctant to apply the upgrade. Can you confirm that 4.4.20 has addressed the performance issues you referred to: “Events Calendar PRO 4.4.19 included some changes in the code that we later found that still need some improvements in terms of performance.”

    Thank you in advance for your help.

    Tony

    Posts: 3271 Topics: 4
    | Permalink

    Hi Tony!

    I’m sorry for the delay in getting back to you with this. I’ve been out for some days and could not look into this sooner.

    Good to know you could clear the database connections issue by downgrading to 4.4.18.

    I have just checked our internal report on the performance issue and it’s still in progress, so we haven’t been able to completely solve it. It seems to be a problem specifically for users with a high number of venues.

    I have linked this thread to that report so we’ll notify you once it’s fixed. I can’t commit to a date for this issue, but it’s likely to be fixed in our next maintenance release as it’s of high priority to us.

    For the moment, I’d recommend you stay with your current version of Events Calendar PRO 4.4.18 and wait until we ship the fix.

    I’m sorry for the inconvenience and we appreciate your patience while we work on this.

    Best,
    Victor

You must be logged in and hold an active support license to create new topics in the help desk. Please visit our products store to purchase a license.

Subscribe to Updates