• Resolved Paul Hartman

    (@paul-hartman)


    Editing and saving any page then viewing any page causes 502 Proxy Error after several minutes of waiting if TEC plugin is active. isitdownrightnow.com shows the site as inaccessible. At some point the site comes back online. Not sure how long, I have tested again in 15 minutes, it could be less than that.

    After deactivating TEC the problem does not occur.

    Second problem: Viewing the Calendar page causes 502 Proxy Error without any edits to pages.

    I have tried:

    • increasing several PHP variables (PHP Time Limit, PHP Max Input Vars, PHP Mem Limit).
    • Clearing server cache
    • Turn on DEBUG in wp-config. Nothing of interest appears in debug.log
    • Deactivate all nonessential plugins
    • uninstall TEC and reinstall
    • Copy everything to a staging site on different webhost. After page edit/save, it works sometimes, other times it takes a very long time to display a page, however it does not generate a 502 error. Also, viewing Calendar page works. So it’s better, but still not working reliably. Maybe this indicates there might be a server configuration issue?

    Any ideas of what I should look for or try?

    Live site (TEC is currently deactivated) is on Hostmonster:

    TEC 6.10.1.1
    Theme: Avada 7.11.14
    WordPress 6.7.2
    PHP 8.2.18

    Staging site (TEC is active) is on Siteground, same versions of everything except

    PHP 8.2.27

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Support tristan083

    (@tristan083)

    Hi @paul-hartman ,

    Thank you for reaching out.

    I recognize how challenging this must be; but, let me try to assist you here to the best of my abilities.

    A 502 error usually mean server resources (memory, CPU, storage, network) depletion. Because of this the server is unable to handle additional requests. This can also mean the server is awaiting data from the database that is taking a long time. In that regard, I would recommend going through our The Calendar is Loading Slowly knowledgebase article for insights and steps you can take to alleviate the situation.

    Thread Starter Paul Hartman

    (@paul-hartman)

    Thank you for the reply. I went through The Calendar Is Loading Slowly article but none of the suggestions were helpful:

    There are zero events.
    There are 2 venues.
    There are 2 organizers.
    Number of events to show per page in list view: 3
    Number of events to show per day: 3
    Month View Cache is enabled
    Recurring events: There are no recurring events (not using TEC Pro).
    Move to trash events older than: Disabled (there are no old events)
    Merge duplicate Venues & Organizers: There are no duplicates.

    This website used TEC 4 years ago, but they stopped using it shortly thereafter. I just reinstalled the plugin because now they want the calendar.

    The main issue is I edit and save a page totally unrelated to TEC (such as a test page with not much on it) and when I try to view that page it takes forever and then gets a 502 error (sometimes 404). If I try to view the site using a different browser it’s the same problem — the site is basically offline for some period of time (many minutes).

    If I deactivate the TEC plugin I can edit and save pages with no issues. Somehow TEC is interfering with editing/saving pages. Is there any debugging technique that I haven’t tried yet that I can use to see what is going on?

    Plugin Support tristan083

    (@tristan083)

    Hi @paul-hartman ,

    Thank you for your message and the information. I’m sorry to hear of the continued difficulties.

    At this point, I suspect there’s a conflict that’s causing the issue here. It would be good to test for conflicts. Could you follow the following steps?

    1. Deactivate all other plugins except for The Events Calendar Plugins.
    2. Switching to the Default theme (preferably the twenty-twenty-one theme).

    Please read the Testing for Conflicts Article before doing anything. 

    To be safe, we’d recommend conducting tests and updates on a Staging Server. Also, please keep a working backup of your website.

    Thread Starter Paul Hartman

    (@paul-hartman)

    TEC has been updated to 6.10.2

    As expected 2021 theme works. I created a new page and published it and I could view it with no problem. The Calendar page comes right up.

    I have used TEC with the Avada theme on about a dozen other sites without problems. In fact, TEC comes bundled with the theme. So compatibility shouldn’t be an issue.

    Any ideas for what else I can try?

    Thread Starter Paul Hartman

    (@paul-hartman)

    Is there a way to delete all TEC tables and data in the MySQL database? TEC was installed on this site in 2021, and then removed shortly afterward. I recently reinstalled the plugin. Perhaps there is some stale data in the database that is causing a problem? There are no events/venues/organizers that we need to save, we’re starting over, so resetting everything related to TEC is OK to do.

    Plugin Support Darian

    (@d0153)

    Hi @paul-hartman

    You could try installing this extension, and delete events/venues/organizers, and see if that helps.

    See- https://share.zight.com/NQunPwK4

    If it doesn’t help, you could try re-migrating your events to a new Event Data System. To do that, please do the following:

    1. Update to the latest versions of The Events Calendar and Events Calendar Pro.
    2. Remove any un-needed draft events and empty the Trash.
    3. Activate only our plugins and use the 2021 theme.
    4. Make sure server-side caching is disabled temporarily while you’re migrating your events.
    5. Install and activate the Code Snippets plugin.
    6. Add this snippet and run it once (be sure it does not stay activated).
    7. Go to Events > Settings > Upgrades and go through the migration process again.

    Please make sure to at least have one event before doing the migration. As always, do the migration on your staging site first before applying it to your live site.

    Let me know how it goes.

    Thread Starter Paul Hartman

    (@paul-hartman)

    None of that helped. Is there a way to see what it’s doing with it goes into the weeds? With TEC deactivated, I have no issues — viewing pages happens immediately after editing/updating. With TEC activated, if I edit a page & update, then try to view any page (not even the one I edited) I see the bouncing ball on the browser tab for many minutes. Then I’ll get usually 502 or sometimes 404 error. I never get the actual page.

    Another thing: MySQL version is 5.7.23, which seems old compared to other websites I manage, which are 8.0.39. I don’t see a way to change MySQL version in cPanel. Do you think that might be an issue?

    Plugin Support Darian

    (@d0153)

    Hi @paul-hartman

    That could be the reason. MySQL 5.7.23 is quite outdated, and newer versions like 8.0.39 offer better performance, security, and compatibility.

    I’d recommend reaching out to your hosting provider—they should be able to guide you on how to update it.

    As always, please make sure you have a backup before updating anything.

    Let me know how it goes.

    Plugin Support Darian

    (@d0153)

    Hi @paul-hartman

    I hope you’re doing well. I just wanted to touch base and check in with you. It’s been a little while since we’ve heard from you. I was just curious if you had the chance to try out the recommendation provided above.

    Let me know if there’s anything I can assist you with.

    Thread Starter Paul Hartman

    (@paul-hartman)

    Hostmonster is in the process of updating their servers to MySQL 8.0 (currently it is 5.7). They could not give me an expected date for our server. They said I could create a new account on Hostmonster because it would have MySQL 8.0 but then we would lose the hosting plan we already paid for (expires in August). And I don’t know if updating MySQL would fix the problem anyway.

    I had another idea: I was thinking that maybe the database had gotten corrupted somehow so I created a development site with a fresh install of WordPress and the Avada theme and TEC, then exported content from the live site (JSON file) and used WordPress importer to import to the development site. Still have the error. It is on the same server, so is using MySQL 5.7.

    I am out of ideas, other than to wait until Hostmonster updates MySQL (don’t know when that will be), or use a different events calendar plugin, or move to a different hosting company (which would lose the hosting plan on Hostmonster through August that is already paid). None of those are good options. I let my client know and they will decide.

    Plugin Support tristan083

    (@tristan083)

    Hi @paul-hartman ,

    Thank you for your message, and I’m sorry to hear of the continued difficulties.

    Does the development site have existing events, venues, organizers, event categories, and tags in it? If yes, have you tried completely removing these data from within the admin dashboard (if that’s an option for you)?

    Thread Starter Paul Hartman

    (@paul-hartman)

    Good point! I started with a new install of WP, Avada theme, and TEC. Then imported the exported XML file from the live site. But I included everything in the exported file, I should have excluded TEC data (events, organizers, etc.) So I will have to start over and go through the process again. I don’t have time today, so I’ll try it tomorrow.

    Plugin Support tristan083

    (@tristan083)

    Hi @paul-hartman ,

    Thank you for your message and update.

    Please feel free to let us know how things go or if you have further questions/concerns.

    Thread Starter Paul Hartman

    (@paul-hartman)

    Still the same problem. I thought that when I exported all the WordPress content from the live site using the WP exporter to create an XML file that all the TEC content came with it (events, venues, etc.). But I found out that when TEC is deactivated that WP does not export TEC data. Also, I had deleted the TEC data using the TEC extension Test Data Generator plugin. So the development site I created had no old TEC data and I did not add any new data either. Still the same issue: if TEC is activated when I edit & save a page I then cannot view any pages — it’s busy for a looong time and then I get 502 or 404 error. At some point (not sure how long exactly, maybe 10-15 minutes) the site is working again as long as I don’t edit anything. I have run out of ideas. Is there any way to find out what it’s doing when the site goes into the weeds? I don’t know how to debug PHP or JS code.

    Plugin Support Darian

    (@d0153)

    Hi @paul-hartman

    Thank you for your response.

    Were you able to check with your hosting provider if there are any server errors or database issues related to The Events Calendar plugin? Identifying any errors on their end could help us narrow down the cause of the issue. Let me know what they find.

Viewing 15 replies - 1 through 15 (of 25 total)

The topic ‘502 Proxy Error’ is closed to new replies.