Skip to content
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

Your socket connection to the server was not read from or written to within the timeout period. #570

Closed
mikexavier opened this issue Jun 17, 2024 · 7 comments
Assignees

Comments

@mikexavier
Copy link

I'm encountering an issue with AssetFiles sst:aws:BucketFiles in both an Astro and Next.js site. One project has both in a monorepo and I just set up a fresh Astro site today, and ran into the same issue.

Error Frontend sst:aws:Astro → FrontendAssetFiles sst:aws:BucketFiles Your socket connection to the server was not read from or written to within the timeout period. Idle connections will be closed.

Temporary workaround

If I run sst remove, delete the .sst directory, then redeploy, it rarely works. Otherwise, I need to manually delete everything, including SSM parameters, and start again. The first fresh deploy works, subsequent deployments result in the same error.

Troubleshooting Attempts

  • sst refresh sst refresh sst refresh too many sst refresh's
  • Yup, turned it off and on.
  • Checked for large files being uploaded (one site has a few images, max 140kb; the other totals around 1.5mb of images).
  • Tried a different network.
  • Checked for proxies or dropped connection issues.

Additional Info.

When I hunt around the interwebs, I can find some references to

s3 putObject The error you have received indicates that S3 never received your request or it's related data, this eventually resulted in S3 timing out the connection due to idleness.

This can occur in instances where network connectivity is impacted by one or more following:

- Poor Network Connectivity
- Misconfigured Routers/Gateways
- Misconfigured Firewall/Proxy or Transparent Proxy
- Usage of Deep Packet Inspection (such as those which re-write HTTP headers) found some Firewalls
- Operating System that has either misconfigured network configuration or is not capable of dynamic MTU adjustments
- There may be other network or system related issues which could additionally also cause similar behavior.

I've tried to run through these checks, and can't find anything obvious... but could also be looking in the wrong places.

"brandymarsh" on discord seemed to be having a similar issue under different conditions

I'm not even sure where to start troubleshooting this. Let me know what you need from me that might help!

@jayair
Copy link
Contributor

jayair commented Jun 25, 2024

Can you share some steps to reproduce this?

Edit: Related, is this on dev or deploy?

@jayair jayair self-assigned this Jun 25, 2024
@mikexavier
Copy link
Author

Hey @jayair I'm not sure if this is related, I was in France when I was experiencing the issue... and since getting back to Switzerland, it's not happening.

The connection in France was much slower (especially uploads)... could this cause the problem?

Otherwise, it was on deploy, using an Astro starlight starter
pnpm create astro --template starlight

I had set up Internationalization and added a bunch of mdx files under src/content/docs/en, de, fr ...with a few jpg's, png's and SVG's in src/assets.

...but yeh, hasn't happened since I got back.

@jayair
Copy link
Contributor

jayair commented Jul 4, 2024

Yeah that could be it. Was it on sst deploy?

@mikexavier
Copy link
Author

yes just on sst deploy, when running sst dev everything worked without issue.

@jayair
Copy link
Contributor

jayair commented Jul 4, 2024

Yeah I can see the connection dropping in between. I'll close this for now. Feel free to reopen if it happens again.

@jayair jayair closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2024
@ghardin1314
Copy link

I am also hitting this error often when trying to deploy multiple nextjs apps at once under the same project (monorepo). I can try to set up a reproduction in a bit if needed

@jayair
Copy link
Contributor

jayair commented Jul 26, 2024

@ghardin1314 So you are doing an sst deploy and you hit this because there are multiple Nextjs apps in the monorepo?

Yeah a repo to reproduce would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants