Duplicate items and now 504 Gateway Time-out

  • Hi,


    We built a small church website that's been running on Perch 3 with no issues for about 2 years. We're also running the same code on a couple of other sites without issues.


    A couple of weeks ago we noticed items (weekly messages) were being duplicated multiple times (visible both on the webpage and in the CMS).


    The site then started getting 504 Gateway Time-out meaning the site didn't load but also made it hard (and then impossible) to fix the issues in the CMS. When we could access the CMS we still couldn't delete the duplicate items (when you clicked confirm delete, it did nothing).


    Talking to our hosting supplier they suggested updating the hosting and db size (they said that the tables perch3_content_index and perch3_content_items were very large), which we did but that hasn't helped.


    I can access the db via phpMyAdmin and those tables are large but I'm guessing the real issue is the duplicated items (which can be seen in the db).


    I'm not sure how, and if it's ok, to try to remove items directly from the db??


    I'd appreciate any support on how best to troubleshoot this issue or if others have had similar issues previously.


    Many thanks,
    Elliot



  • drewm

    Approved the thread.
  • If you use the no-index attribute on your content templates, as well as reduce the undo buffer, that should help keep the index table down a bit.


    As for the duplicating items, do you know when the items are being duplicated? Is it after you save/update items? Do you have scheduled tasks setup? I wouldn't delete anything straight from the DB, but if you fetch the ID's you should be able to write a script to find the content items in question and use the factory methods to safely remove them for the time being.

  • Hi Byron,


    Thanks for the reply. I posted another comment in the thread but that hasn't been approved - I'll try to post it as a quote.


    I tried re creating the db from a back up - website seemed ok for a short while and then the db fell over again (size of content_items and content_index doubled in size). Hosting support then sent :



    If I try to delete duplicate items within Perch I get logged out and the number of dups increases.


    The site is using quite basic Perch templates but something major has gone wrong - really not sure where to start fixing it.