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 3 years, 3 months ago.
- AuthorPosts
- February 21, 2020 at 11:25 am #25911
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…
February 21, 2020 at 12:42 pm #25912Hi,
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 :)
February 21, 2020 at 12:51 pm #25913sorry we have forgotten to change permissions: access for /siteprofile.ru/htdocs/wp-content/plugins/ajax-search-pro enabled now
Please try again Ernest!
Thanks!
February 21, 2020 at 1:44 pm #25915Hi!
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
Best,
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.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 21, 2020 at 1:51 pm #25916Thanks! We will check fragmentation. If we update the plugin (when you release a new version) – that bypass will be active too or not?
February 21, 2020 at 1:58 pm #25918It 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 :)
February 21, 2020 at 2:06 pm #25919ok! thanks.
- AuthorPosts
You must be logged in to reply to this topic.