-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry logic and more error reporting #41
Comments
How are you triggering the jobs in this case? I'd expect WP_CLI running would throw some errors that aren't surfacing via web. Sometimes, I've found timeout logs in web server/load balancer/system logs. We could really use some better job handling like in SimplerStatic's WP Async Task usage, but even some issues with that. Definitely need that kind of thing sorted before re-attemtping async/parallel crawling |
Sadly don't have SSH into my Fargate container so can't trigger CLI via an actual command line - so it's all via the UI. Just experimenting with some try/catch around the S3->Put:
Should at least log out S3 errors and continue instead of silent death. Of course since implementing that I haven't seen it die since :( I'm keen to see about implementing s3 sync as an alternative to 'reupload everything not in cache' - although just reading here I see v3 of the PHP SDK changes the behaviour and just uploads everything.... will keep looking into it. |
We should definitely catch the exception. We can do some basic backoff-retry in the case of network errors, because failing outright can be messy. In the case that we do fail entirely, how do we want to handle that? We can't leave the task "processing", but marking it "complete" is misleading, Should we introduce a "failed" state? I think all sync does is compare modified times and MD5 hashes and upload any mismatches. It should be pretty straightforward to implement. You could probably leave the existing deploy logic mostly as-is, but before it runs list your current objects and update the deploy cache with that data. Metadata and redirects might be trickier, as the current implementation includes those in the hash but IIRC S3 only includes the object body. You might need another column in the deploy cache table. |
Having real struggles with the addon at the moment... deploy job keeps stuttering to a halt, but wp2static shows it as processing forever. Nothing in wp2s logs or php logs, but deleting and re-adding the deploy job will eventually process everything - so it can't be a fatal block - but I think some retry logic or more verbose error logging would really help pin this down - currently I'm at a loss at to the ultimate cause.
The text was updated successfully, but these errors were encountered: