• Resolved jul1a

    (@jul1a)


    I have a staging site and a live site. Here’s the order of things that I did:
    1. Install Algolia on the Stage, with an Algolia app 1 (purchased a starter subscription)
    2. Push to live (after making a couple template changes, etc)
    3. Re-index index on app 1 for the live site (urls are different, etc)
    4. Made a new app on Algolia, free version (app 2)
    5. Linked app 2 to stage and re-indexed everything

    Now the only index on app 2 is wp_searchable_posts_tmp while app1 has wp_searchable_posts, along with some wp_post-type indicies according to the posts I have selected for indexing. There is no server side caching on my staging site, so I am not sure if that would be the problem.

    Is there a way to properly index my staging site on app 2? Or are there any other suggested workarounds/approaches to using algolia with a live site and a staging site?

    One more thing, I get this in the PHP error logs when I try to load the search page:
    PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 149581909 bytes) in /nas/content/staging/mySite/wp-includes/kses.php on line 1248, referer: https://mySite.staging.com/wp-admin/admin-post.php

    and this is the browser-side error log:
    https://xxxxxxxx-dsn.algolia.net/1/indexes/*/queries?x-algolia-agent=Algol…plication-id=xxxxxxxxx-algolia-api-key=xxxxxxxxxxxxxxxxxxxxx Failed to load resource: the server responded with a status of 404 (Not Found)

    TIA for your help!

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

    (@rayrutjes)

    Hi Julia,

    Thanks for such a detailed explanation.

    In general, if you keep seing an index suffixed with _tmp it means the indexing didn’t go well. In your case the PHP error could explain it.
    I’m curious about the error though because it seems like there is some sanity check while computing the content to push to Algolia that requires a lot of memory.

    Quick fix: increase the server’s memory
    Other approach: disable plugins one by one to figure out which one is being overly consuming memory while computing the content.

    Regarding the strategy between different environments, I would suggest you take a look at this guide: https://community.algolia.com/wordpress/migration.html

    I hope that helps ??

    Thread Starter jul1a

    (@jul1a)

    Hi Ray, thanks for the response.

    So you’re saying that the problem is the memory on my site is over-taxed when trying to perform the index? Or is it the memory of my index on algolia that is not large enough? It is a free plan, is there a chance that it could be not working because there is not enough index space allotted to me?

    Thanks for that link, I’ll look into that.

    Plugin Contributor rayrutjes

    (@rayrutjes)

    The problem is indeed on your server not on Algolia’s side.
    The error you are getting states that you have reached the maximum allowed memory while the indexing took place.

    We have seen this happen when some plugins perform heavy computation on the post content before rendering. We actually need to trigger that process for every post to ensure we store the real post content as outputted on your website.

    What you could do is try disabling some plugins and see if the problem persists.

    Otherwise, try adding some memory to your server.

    I hope that helps!

    Thread Starter jul1a

    (@jul1a)

    It turns out that I just didn’t have enough space on a free algolia app. To fix my problem I just implemented some of the migration techniques suggested in the link you sent, and am only using my one app now.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘New App Index won’t display’ is closed to new replies.