• Resolved wp_victim

    (@wp_victim)


    Hello support..

    I am using
    wordpress: 4.5.3
    PHP: 5.4.16
    MySQL: 5.5.50 MariaDB Server

    The error below happens every time I try to index mysite.

    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 for query SELECT meta_key, meta_value FROM wp_postmeta WHERE post_id = made by do_action('admin_post_nopriv_wp_async_algolia_process_queue'), call_user_func_array, WP_Async_Task->handle_postback, Algolia_Task_Queue_Loopback_Async->run_action, Algolia_Task_Queue->run, Algolia_Task_Dispatcher->dispatch, Algolia_Index->handle_task, Algolia_Index->re_index, Algolia_Searchable_Posts_Index->get_records, Algolia_Searchable_Posts_Index->get_post_records, apply_filters('the_content'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, Triathlete_Shortcodes->gallery_embed, Triathlete_Theme::get_meta

    and

    PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in .../wp-content/plugins/search-by-algolia-instant-relevant-results/includes/libraries/php-dom-parser/lib/simple_html_dom.php on line 1555

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor rayrutjes

    (@rayrutjes)

    Hi @wp_victim,

    It looks like you are running out of memory when the indexing takes place.

    By default, we index 50 items at a time, but depending on the number of plugins you have and the maximum amount of memory you can use it can be too much.

    You can change that default batch size by doing so:

    
    add_filter( 'algolia_indexing_batch_size', function () {
    	return 10;
    } );
    

    Let me know if that helped.

    Thread Starter wp_victim

    (@wp_victim)

    thank you @rayrutjes,

    I have bumped resources in my server (8gb ram), which is running only this site.

    Setting algolia_indexing_batch_size down to 10 does take me further, but eventually crashes with the errors pointed in the initial post.

    any other suggestion?

    thank you regardless…

    Plugin Contributor rayrutjes

    (@rayrutjes)

    – Do you use any kind of caching plugin?
    – Do you have valid SSL certs or none?
    – Is your server able to reach itself over http?
    – Does the plugin actually succeeds adding some records or none are reaching Algolia?

    Hoping that the answers will help us moving forward!

    Thread Starter wp_victim

    (@wp_victim)

    – Do you use any kind of caching plugin?
    No.

    – Do you have valid SSL certs or none?
    None.

    – Is your server able to reach itself over http?
    Yes.

    – Does the plugin actually succeeds adding some records or none are reaching Algolia?
    Yes, at least seems like it. I checked into my dashboard at algolia and I see some records overthere.

    Plugin Contributor rayrutjes

    (@rayrutjes)

    Sorry about the delay,

    Could you send me over your application ID with the list of plugins you have installed at [email protected] by mentioning my username @rayrutjes ?

    Really sorry about this issue, looking forward to fix it. Do you use the version 1.3.0 of the plugin?

    Thread Starter wp_victim

    (@wp_victim)

    Hi @rayrutjes..

    I sent the email.

    and yes.. plugin version 1.3.0.

    Plugin Contributor rayrutjes

    (@rayrutjes)

    Hi again @wp_victim,

    Sorry about the delay,

    We fixed a major performance issue in version 1.4.1 of the plugin. Could you upgrade to that version and tell me if the issue is gone?

    Thanks a lot,

    Thread Starter wp_victim

    (@wp_victim)

    Version 1.4.1 is working and as you point out via email… my indexing issue seems to be related to our theme shortcode settings.

    I will keep you posted as soon as the indexing process completes.

    Thank you for the support @rayrutjes!

    Plugin Contributor rayrutjes

    (@rayrutjes)

    Hi again!

    I recognize the error there ??

    The thing is that in your custom shortcode you make a call to get_post but this gets called during the indexing without the global post being set.

    Is there a chance you could extract the dependency on the global state?

    To be honest, I’m not sure if this is a bad practise or if this something we see in other plugins. If this is indeed something that is something that users tend to do, we might want to develop a workaround in our plugin.

    Please le me know how you end up fixing this!

    Thread Starter wp_victim

    (@wp_victim)

    @rayrutjes… you nailed with your troubleshoot!.. fair enough to mark this issue as resolved.

    Thank you very much sir.. I believe this issue is more of a bad practice and my Devs are working on making this on the right way.

    After you pointing out the issue the index was pretty much all the way to the end, but found one more shortcode was found set to global.

    My team is fixing that one as well and we will finally be able to enjoy Algolia in full power.

    thank you again for the help and great troubleshoot support!!

    cheers

    • This reply was modified 8 years, 4 months ago by wp_victim. Reason: Forgot to confirm that issue was solved
    Plugin Contributor rayrutjes

    (@rayrutjes)

    @wp_victim I’m glad you found a solution to the issue, and feel free to ping us again, always a pleasure!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘index error Algolia’ is closed to new replies.