Elasticpress: Unable to sync an error occured while syncing

Created on 24 Aug 2017  路  11Comments  路  Source: 10up/ElasticPress

Hi

I can not sync the data with elasticsearch where as in dev environment it works, with production database we always gets an error occured while syncing message and we can also see admin-ajax.php 500 error when the sync fails in console. I have tried increasing the timeout value in elasticpress plugin did not help.

Most helpful comment

Perhaps it's a php memory limit error? I've been battling the same issue when I try to sync Documents / Protected Content. You could check your apache error logs to see if that's what the issue is.

I've been able to mitigate it by doing either of these two things:

  • Increase your memory limit (memory_limit) in your php.ini OR
  • Decrease the number of items it attempts to sync at a time by changing line 534 in class-ep-dashboard.php from 350 to a lower number. I dropped it to 100 and it seems to work with the default 128M memory limit.

All 11 comments

Perhaps it's a php memory limit error? I've been battling the same issue when I try to sync Documents / Protected Content. You could check your apache error logs to see if that's what the issue is.

I've been able to mitigate it by doing either of these two things:

  • Increase your memory limit (memory_limit) in your php.ini OR
  • Decrease the number of items it attempts to sync at a time by changing line 534 in class-ep-dashboard.php from 350 to a lower number. I dropped it to 100 and it seems to work with the default 128M memory limit.

thanks @andrewblossom this worked

Thanks andrewblossom, the second point worked

Hello, this is an old topic but I am having problems with server 500 errors. I have increased memory size to 1gb and reduced to 100 item per cycle, but I am still getting errors. Is there any way to investigate further?

Edit: Also, is there any way to resume syncing, sync what is not synced already, or manually sync categories for example?

@scooterlord , the best way to debug this type of error is running an index via WP-CLI with the --show-errors flag. Did you already try that? If you did and it didn't give you any hint about what is going on, I'd recommend opening a new issue :) Thanks!

@felipeelia Thanks for the swift reply! Have no idea how to do this! Any pointers?

edit: Might not be possible since I am using a shared service. Any other way to deal with it?

I am getting timeout errors... other times at 10000ms, others at 3000ms. My time limit is currently set at 30s though.

@scooterlord sure! :) this would be the command you'd have to run in the terminal

wp elasticpress index --setup --show-errors

Felipeelia, actually it was easier than I thought to install wp-cli. Run the command, currently syncing.. will respond when it's done (shortly). Thank you so far!

I got a Warning: Too many requests several times, but the process continues... is this normal? Could this be the reason that the front-end hangs? The process finished successfully after all though. I don't mind doing this through CLI if it fixes my problem.

Also, I wonder why the same behaviour doesn't occur on the frontend as well?

Can I somehow increase this limit, or is it a host thing?

@felipeelia Host confirmed that there is no limit on incoming requests. What else could it be? From what I am seeing, I am well above the limits people in this thread are talking about. What other limit can I increase?

Hi @scooterlord ,

Yeah, that would require some further investigation. Do you mind opening a new issue here at GitHub? Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andrewbanchich picture andrewbanchich  路  3Comments

digiswede picture digiswede  路  6Comments

blindpet picture blindpet  路  7Comments

keg picture keg  路  4Comments

jakejackson1 picture jakejackson1  路  8Comments