• When many many thousands of people have submitted the form it seems that inbound message save is saving many many entries with the same post name/title.

    This causes WordPress to loop wp_unique_post_slug to generate a unique slug with a prefix of -1249 for example. But each iteration it’s doing a database query to check if a post exists.

    Would it be possible to release a patch uses a GUID or some random identifier or maybe uses the submitters email address or name as the post name/title?

    Thanks.

    I checked the database and I see many many entries with slugs like this with many different numbers at the end all incrementing, and my server logs show the submission of the contact form is gradually slowing and slowing.

    competition-entry-12342

    New Relics reports:

    5.945s – Flamingo_Inbound_Message::save
    5.945s – we_insert_post
    27,600s – wp_unique_post_slug

    wp_unique_post_slug calls the database beyond 500 times

    • This topic was modified 5 years, 4 months ago by driskell86.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Extremely slow logging in inbound message save’ is closed to new replies.