Very high cpu usage, sync calls every second

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1098747
    Andy Smith-Dane
    Participant

    Since the 18th March the site I have running hotel booking has been showing huge CPU usage, on checking the logs, it looks like a sync job is being ran every single second.

    I’ve raised a ticket, but the site is likely to be taken offline by the host for going over CPU usage shortly.

    It’s definitely only been happening since March 18th, so not sure if anything changed on that date update wise?

    #1098750
    Andy Smith-Dane
    Participant

    I think I might have found the culprit, sync jobs were stuck and piling up on top of each other.

    Is there any way a feature could be added where by if a sync hasn’t completed by the time the next sync is due, it aborts the previous one? That seems to have sorted it

    #1098851
    Andre Flores
    Moderator

    Hello Andy,

    I would recommend to set the “Automatically delete sync logs older than” option to the minimum possible interval (Day) – this will prevent database from being overloaded with sync logs.

    Regards,
    Andre

    #1181049
    Gundula Uray
    Participant

    The hotel booking cron job is only deleting a maximum of 100 logs every 6 hours. This is not enough and the database is still bursting after a couple of weeks bringing the server to its knees resulting in massive read/write activity as described above. The current limit is not adequate if you sync every 15 mins with as little as 5 rooms/properties (4 syncs per hour x 5 rooms x24 hours =480 logs per day; the cron job is only deleting 200 per day which means you accumulate 240 logs per day aka 7200 per month with just 5 rooms!)

    Could you please consider increasing the limit considerably – I e I have 20 rooms so need the limit to be at least set to delete 1920 logs per day.

    Otherwise the hotelbooking plugin can’t be used for properties with more than 4 rooms.

    Thanks!
    Peter

    p.s.: this is where the cron job code resides:
    \wp-content\plugins\motopress-hotel-booking\includes\crons\delete-old-sync-logs-cron.php

    and that is the line that I asume controls it:
    $query = $wpdb->prepare(“SELECT queue_id FROM {$queueTable} WHERE queue_name < %s LIMIT 0, 100”, $pattern);

    #1183067
    Andre Flores
    Moderator

    Hello Gundula,

    Thank you for your detailed feedback, it is very much appreciated.
    We have already passed the request to our developers regarding this matter and are currently collecting feedback from our users. We might consider adjusting the automatic logs removal in plugin future updates in order to prevent database from sync logs overload.
    Once there is any information regarding this matter, I will immediately let you know.

    Regards,
    Andre

    #1184807
    Gundula Uray
    Participant

    Thanks Andre,

    Can I just point out that this is quite serious as it causes overbookings as the rooms are no longer synced with other sites. Issues in detail:

    Problems if not fixed:
    • Massive READ/Write cycles (several megabites per sec just in MariaDB task alone)
    • Sever gets super slow after days and gets to its knees after weeks
    • STATUS of logs stay in WAITING instead of DONE status meaning that the SYNCING is NOT WORKING. Causing overbookings! This is most serious!

    Peter

    #1186931
    Andre Flores
    Moderator

    Hello Gundula,

    Kindly submit a request to our Help Desk providing your website URL and temporary access to WordPress dashboard, so I take a closer look at the issue. Perhaps, I will be able to find some workaround in order to avoid this issue.

    Regards,
    Andre

    #1209682
    Andre Flores
    Moderator

    Hello everyone,

    We are delighted to let you know that we have just released the Hotel Booking plugin update v. 4.0.0 with the automatic synchronization process optimization included. This should help to avoid issues with the database overloading with the sync logs and make the whole synchronization process more stable.
    Feel free to update the plugin to the latest version and experience optimized synchronization process.

    Regards,
    Andre

    #1212473
    Corey Benoit
    Participant

    Thank-you for posting the update here, I was dealing with this issue and will now update.

    #1212641
    Andre Flores
    Moderator

    Hello Corey,

    You are most welcome, we are looking forward to your feedback regarding the new improvement.

    Regards,
    Andre

    #1278334
    Eugene White
    Moderator

    Hello there!

    We are glad to let you guys know that we have released the Hotel Booking plugin version 4.2.2 where the automatic synchronization process is optimized. This should help to avoid issues with the sync logs removal and make the whole synchronization process more stable. Feel free to update the plugin to its latest version and let us know in case there is something we can help you with.

    Best regards,
    Eugene

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.