Problems with the index

  • andreirebe
    Participant
    3 years, 8 months ago #20196

    The old development team put up some custom coding to optimise some WordPress queries and modified the core. Nothing that can happen on some other install. Your other clients are safe and should not get that error. I am sorry for the trouble.

    wpsolr
    Keymaster
    3 years, 8 months ago #20201

    Your indexing stuck could be due to a timeout?

    Do you have anything in logs?

    andreirebe
    Participant
    3 years, 8 months ago #20202

    Every time a cron is running I get and email. This is something that I got:

    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
      0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
    ...
    100   296    0   296    0     0      0      0 --:--:--  0:05:01 --:--:--    64
    100   296    0   296    0     0      0      0 --:--:--  0:05:01 --:--:--    82
    <html><head><title>500 Internal Server Error</title></head><body>
    <h2>Request Timeout</h2>
    <p>This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.
    </p>
    </body></html>

    What is an optimal connection timeout?
    Also how can i restart the cron in case of a timeout?

    wpsolr
    Keymaster
    3 years, 8 months ago #20209

    Increase your PHP timeout.

    andreirebe
    Participant
    3 years, 8 months ago #20210

    How can I restart the cron in case of a timeout?

    orbiteers
    Participant
    2 years, 12 months ago #25138

    Hi,
    We have similar issue on wpengine – it’s running a bit long and getting terminated by host. We have ~3300 products and about half of them got reindex.
    After that I’m getting 404 reponse (actual – page not found – I assume this is response when there is nothing to do for a this call).
    I can cancel cron and reindex rest of products from plugin admin section after but I have product import run every night and need automate reindexing.
    How do we recover from situation when process get terminated?
    Thanks

    wpsolr
    Keymaster
    2 years, 12 months ago #25139

    @Orbiteers 404 is abnormal. If nothing remains to index, you should get an answer from the cron api that says so.
    It is possible that the 404 comes from resource exhaustion on your server. You should find some answers in your server logs( php or WordPress).

    What happens if you execute your cURL api by hand?

    orbiteers
    Participant
    2 years, 12 months ago #25142

    Are there any suggestion you can provide to deal with process termination of curl call by host?

    wpsolr
    Keymaster
    2 years, 12 months ago #25143

    The cURL —-max-time parameter?
    After that, php logs, apache logs.

    orbiteers
    Participant
    2 years, 11 months ago #25170

    Calling curl a couple times swill complete reindexing – that will work for me.
    Was digging around my 404 error and figured out that rewrite rule sometimes removed for no apparent reason. I saw rule in databse [wpsolr-api/json/cron/([a-zA-z0-9_]+)/?$] => index.php?wpsolr-api/json/cron=$matches[1] and then it’s gone. It may have issue with other plugins/theme. So far it’s not clear with me.
    My workaround is to calling cron job with query prameters:
    https://site&#8230;./index.php?wpsolr-api/json/cron=CRONUUID

    If I find issue that causing rewrite_rules removal I’ll post it

    wpsolr
    Keymaster
    2 years, 11 months ago #25171

    Thanks for the feedback.

Viewing 11 posts - 16 through 26 (of 26 total)

You must be logged in to reply to this topic.