• Resolved Olybop

    (@olybop)


    why your plugin make loop request this ?
    SELECT wp_users.ID,wp_users.display_name FROM wp_users WHERE 1=1 ORDER BY user_login ASC

    This cause big la on the cloud server

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Jeff Starr

    (@specialk)

    This plugin was adopted from a previous developer years ago. Some of the code still could use an update. So thank you for reporting this, I have added to the list and will try to improve the database queries for the next plugin update. Feel free to post further if any questions, etc.

    Thread Starter Olybop

    (@olybop)

    For information, i use this plugin with 800 people who are chatting at the same time.
    with a cloud server (20 VCPUs et 32Go de RAM) = fail error 503 too much CPU because “SELECT wp_users.ID,wp_users.display_name FROM wp_users WHERE 1=1 ORDER BY user_login ASC” get all vcpu
    sorry for my poor english

    Plugin Author Jeff Starr

    (@specialk)

    I am working on updating the plugin. But cannot locate any query like:

    SELECT wp_users.ID,wp_users.display_name FROM wp_users WHERE 1=1 ORDER BY user_login ASC

    I have searched the codebase for “wp_users”, “cc”, “1=1”, etc. They do not exist anywhere that I can find. Are you sure that it’s not some other plugin that is causing the error?

    Thread Starter Olybop

    (@olybop)

    The context :
    A client needed a wordpress website with one page. On this page there was a live youtube video (without chat) and your chat plugin.
    I have set the plugin so that there is an obligation to register to post a comment. So, I think the plugin checks the rights of each user before validating their comment. it reviews the 1800 users included in the wordpress database. In the end, the problem is that with each message, it revalidates all users?

    The site was on a managed dedicated server. As soon as the plugin was deactivated, all the resources were available again.

    • This reply was modified 4 years ago by Olybop.
    Plugin Author Jeff Starr

    (@specialk)

    “I think the plugin checks the rights of each user before validating their comment. it reviews the 1800 users included in the wordpress database. In the end, the problem is that with each message, it revalidates all users?”

    No that’s not how it works. If you look at the insert-chat function sac_addData() in the source code in /simple-ajax-chat.php line 287, you will find the only user-related function is wp_get_current_user(), which is provided by WP core. Then after a few steps, $wpdb->insert() is used to insert the chat message into the database. All very standard and efficient functionality.

    Plugin Author Jeff Starr

    (@specialk)

    Any follow up on this, @olybop? Let me know how I can help.

    Plugin Author Jeff Starr

    (@specialk)

    Hey @olybop, I hope you got this sorted. It’s been awhile with no reply so gonna go ahead and mark this thread as resolved to help keep the forum organized. Feel free to post again with any further questions or feedback, Thank you.

    Thread Starter Olybop

    (@olybop)

    Hello,
    sorry, anyway, I can’t reproduce the error. There were 700 people logged in simultaneously and the I / O volume was monstrous. I unfortunately did not recover the logs.
    Thank you

    Plugin Author Jeff Starr

    (@specialk)

    Understood. Thank you @olybop.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Issue’ is closed to new replies.