codesandbox / codesandbox/codesandbox-client

502 Bad GateWay while committing to GitHub

Open
#8,614 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13.6k
Forks
2.4k
Avg merge
6d 19h
Merged PRs (30d)
2

Description

🐛 bug report

Preflight Checklist

  • [ X] I have read the [Contributing Guidelines][contributing] for this project.
  • [ X] I agree to follow the [Code of Conduct][code_of_conduct] that this project
    adheres to.
  • [X ] I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

When I tried to commit to GitHub through the private account (Free account) using Rest API approximately 6MB with 1000 files , I facing a problem in creating commit tree, my payload size exceeds approximately 2.5Mb ( around 200-250 files). I got the 502 Bad Gate way, some times I got the 422 unprocessed entity with time out - payload is large exception (not always). https://api.github.com/repos/{owner}/{repo}/git/trees this is the restApi which gave me the exception. Then I tried to group my files in to small chunks with less than 2.5MB and tried to commit in a linear fashion for creating commit tree, I was able to commit all. The same thing when I tried with the enterprise edition(trial) I was able to commit the 1000 files in single short without any code change or any chunking.

It took weeks for me to analyze the issue, Why no proper exception message or documentation was there? could you please address this and let us know why this difference. Earlier in the staring of year 2024 I was able to commit files with this size above 6MB using free version.

(https://api.github.com/repos/BabithaSujanna/babi/git/trees)

this is my reptApi detail which caused the issue
My payload is a json file and not normal text file

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported GitHub REST API endpoint, /repos/{owner}/{repo}/git/trees, and compare the failing free-account requests with the successful Enterprise request. Reproduce the behavior using the described JSON payload size and file counts, recording the 502 and 422 responses. Done means the account-tier difference and payload limit are explained, with a clear error or documentation path identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
github
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.