can't open index settings – nginx 504 error timeout

Home Forums Product Support Forums Ajax Search Pro for WordPress Support can't open index settings – nginx 504 error timeout

This topic contains 6 replies, has 2 voices, and was last updated by Maxim73 Maxim73 4 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #25911
    Maxim73
    Maxim73
    Participant

    I have 250 000 posts on my website (russian language). And after creating an index table I just can’t open Index Ajax Serach Pro Table Settings in WordPress console – get NGINX 504 Error (timeout) after waiting 10-15 seconds. At the same time – the server quite fast and the site and Ajax Pro search works well and quick… And I don’t know what to do because I can’t change Index settings at all 🙁 Previously I made a setting to update an index table once a day – what the reason that I just can’t open the index settings page? I use flatsome theme and only few plugins…

    Another setting pages except Index I can open well…

    p.s. We increase the nginx timeout to 600 seconds

    p.p.s. I switch the wordpress console to English language…

    #25912
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details, it helps a lot.

    Can you please check the SFTP account permissions? I am not able to make changes to the search plugin files. Thank you!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #25913
    Maxim73
    Maxim73
    Participant

    sorry we have forgotten to change permissions: access for /siteprofile.ru/htdocs/wp-content/plugins/ajax-search-pro enabled now

    Please try again Ernest!

    Thanks!

    #25915
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Thank you very much, that works now.

    Okay, I found the issue, but I could only add a bypass solution. When the index table page is loaded, the plugin runs a “count” query to get only the size of the index and the posts table. However, for some reason that query either fails, or loops or simpyl takes a very long time. I tried different variations, even forced to use indexes, but it did not help whatsoever.
    For now, I simply added a bypass to those functions to simply return “100000000” as the table size, and not to run the query. Aside from that report it should work just fine.

    You can try running a table analyze and table optimize queries to make sure that the table is not fragmented, that would explain the problem perfectly: https://dev.mysql.com/doc/refman/8.0/en/innodb-file-defragmenting.html
    Apparently counting the table rows can be problematic for some MySQL tables, but unfortunately due to access limitations there is no other way to do that at the moment via WordPress.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #25916
    Maxim73
    Maxim73
    Participant

    Thanks! We will check fragmentation. If we update the plugin (when you release a new version) – that bypass will be active too or not?

    #25918
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    It will be overwritten unfortunately, but I can perhaps add a hook to the code to make it permanent with a custom code.
    I think we will do that.

    To make the bypass permanent for the upcoming release you will need a small custom code. Please to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

    add_action('init', 'asp_define_const');
    function asp_define_const() {
        define('ASP_INDEX_BYPASS_COUNT', 1);
    }

    For now it does nothing, but in the next release it will activate the bypass.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #25919
    Maxim73
    Maxim73
    Participant

    ok! thanks.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.