-
-
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
[Error] AWS HTTP error: Client error: POST resulted in a 410 Gone
response
#9
Comments
POST https://xxxxxxx.execute-api.us-east-1.amazonaws.com/yyyyyyy/@connections/DOvZ1cdTIAMCLtA%3D
resulted in a 410 Gone
response Unable to parse error information from response410 Gone
response
Hi Mike, thanks for reporting! I believe this is due to the connection being (unexpectedly) closed by the client. This is currently not handled by Echo. I will investigate and see if I can fix this for you. |
@mikebronner can you please test the |
Hi @georgeboot, thank you so much for the ultra-quick response! :) I will update and monitor over the next few days and report back. Thank you! |
Hi @georgeboot It appears we are still getting them. These might only be occurring when we are deploying, and not on every deployment. I wonder if this happens when vapor deploys midstream of an Echo event? Update: may not be related to deployments after all. The latest error happened 5 minutes after the deployment completed. |
Yeah I think I am catching the exception incorrectly. But it's hard to catch because AWS doesn't document that topic very good (to my knowledge). I will look further tomorrow. |
NP, thank you for all your help with this! Further Update: This may be related to queued events on vapor. I have several failed queue jobs that triggered this error. I will keep monitoring this. |
Mind trying the latest master? AWS SDK has a funny way of handling exceptions but I believe it should be correct this time. |
Absolutely, we'll get it in our next deployment today and keep monitoring. :) |
@mikebronner is the issue fixed now? |
Nope. I just switched to
|
That is a different error. You previously got a |
Whoop, let's me re-test and let's you know. |
@georgeboot , confirmed, it is fixed. I got not error now. |
@georgeboot I installed the update about 2 hrs ago, haven't seen the error come back yet, will continue to monitor. |
It appears that I might still be getting the error. Here is the full stack trace:
|
Grr. Why does AWS make it so hard to mock errors 🙄 Will dive in tomorrow and hopefully fix this once and for real. Apologies for the hassle! |
No fret, @georgeboot, thanks for all your work on this! Also no rush, I don't think these are causing issues? You mentioned the solution is to close the connection and drop the pending message. Is it technically possible to resubmit the message, if it failed, to an open connection, or is the new connection information not available at that point? |
Nope. Connections can only be initiated from the client side. I believe pusher will also just ignore the message. Once I have implemented client-reconnects (#2), this will no longer be an issue as the old connections details will be purged and Echo will only see the new connection. |
Hi @mikebronner , I faced this problem when I broadcasted my message. How about you? |
@semsphy I believe that is the case as well. Is there another scenario this could happen? (Just asking since this package is for event broadcasting, and I didn't know if I maybe missed something to troubleshoot.) |
@mikebronner , indeed, there is only this scenario. I just wanted to confirm your scenario. :) |
Can you try the |
|
Just pushed the new update, will keep monitoring |
Yeah so oke I see what is happening. Thanks for testing for me by the way, appreciate it! Regardless of what type of error the API returns, it already breaks when trying to set-up the
|
I saw the creator of bref, he handled different way.
|
yeah he uses https://github.com/async-aws/aws. Might do that as well, as the main AWS SDK can be a bit of a pain in the ass sometimes. |
Hi guys, I just wanted to check in on this. I know there is the issue opened with AWS. @georgeboot have you been able to make any progress implementing async-aws? This is becoming critical for us, we are seeing around 14000 errors due to this each month, impacting our user-experience significantly. Thanks again for all your hard work on this package. :) |
@mikebronner can you perhaps help with Sam's request in aws/aws-sdk-php#2285 (comment)? I'm just too busy to do all the debugging work now. As soon as AWS SDK fix the issue, this package should have the fix as well. Moving the async-aws is an option, but likely more work. |
@georgeboot sure thing, I'll give it a shot. |
@georgeboot quick question: can you point me where to set |
I believe what Sam wants is the following:
Setting laravel-echo-api-gateway/src/ConnectionRepository.php Lines 17 to 20 in 957ce4f
As you already have the package deployed, you could inspect the DynamoDB table to obtain a connectionId. Wait till it disconnects and send the message from your local computer (using live key ID + secret). Thats the easiest I can think of. Thanks for helping! |
@georgeboot Thanks for the hints. We have not been able to replicate the problem, we always get |
@mikebronner are you able to post to a valid connection? 403 indicates unauthorised, which is a different error. |
@georgeboot Yes, but the connection is already gone. We were looking through our logs, and the code for the package, and think we might have an idea. Our AWS guy is thinking that this is due to ConsistentReads defaulting to false. What if you did this:
And then also further down where you run This is just an observation, since we cannot reproduce it under set conditions, and our thinking is that it is due to the asynchronous nature of DynamoDB instances, and getting that to stay in sync with our app. I'll submit this in a PR and test. |
Could be, but sounds like a race condition to me. Happens a bit too much for that, but perhaps you're right. If happily accept your PR if it fixes the issue 😊 |
I put the PR patch in my composer and will be testing, I'll let you know. :) |
I was getting this same issue when I was trying to implement presence channels. I think this change to src/ConnectionRepository.php should fix this issue - it seems there may be multiple ways that the exception is being thrown. https://github.com/georgeboot/laravel-echo-api-gateway/pull/25/files |
Thank you for this package! I'm using it in conjunction with Laravel Vapor.
I'm receiving the following error intermittently, multiple times per day:
I believe this has the side effect that the Laravel Echo event will not update the site when this error happens. I'm unclear as to what the cause might be.
The text was updated successfully, but these errors were encountered: