hasura / hasura/graphql-engine
502 Bad Gateway error when running hasura seeds create
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: v1.3.3
CLI Version (for CLI related issue): v1.3.3
### Environment
OSS
### What is the expected behaviour?
Seed file should have been created
### Keywords
hasura-cli, seeds, seed, create, 502 Bad Gateway
### What is the current behaviour?
It fails with the following error
```
FATA[0007] exporting seed data: failed parsing json: invalid character '<' looking for beginning of value; response from API:
502 Bad Gateway
502 Bad Gateway
nginx/1.18.0 (Ubuntu)
/html>
```
### How to reproduce the issue?
1. Choose a table with more than 4k rows
2. Try to create a new seed from this table :eg. Run `hasura seeds create --from-table `
### Screenshots or Screencast
### Please provide any traces or logs that could help here.
### Any possible solutions?
I exported the tables as CSV and manually copied them to postgres. Was trying to migrate/seed tables from production to staging and I didn't have DB access initially, so thought of making use of hasura-cli
### Can you identify the location in the source code where the problem exists?
No
### If the bug is confirmed, would you be willing to submit a PR?
Yes (if hasura-cli is written in a language I know)
Contributor guide
Research direction
Start by reproducing the issue with `hasura seeds create --from-table ` against a table with more than 4k rows. Trace the seed export entry point and the response shown in the issue; done means the command creates the seed successfully instead of treating the 502 HTML response as JSON.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgres
- Domain
- cli, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100