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

dio push fails with 500 internal server error #11

Open
larsks opened this issue Mar 14, 2022 · 3 comments
Open

dio push fails with 500 internal server error #11

larsks opened this issue Mar 14, 2022 · 3 comments

Comments

@larsks
Copy link

larsks commented Mar 14, 2022

I tried to upload 1.5MB sqlite datbase using dio push, but it failed with a server error:

$ ls -l us_states_covid.db
-rw-r--r--. 1 lars lars 1503232 Mar 14 10:15 us_states_covid.db
$ dio push us_states_covid.db
Upload failed with an error: HTTP status 500 - '500 Internal Server Error'

And in a fascinating bit of trivia, I discovered that a Google search for "dio push" is not helpful at all.

@justinclift
Copy link
Member

@MKleusberg Any interest in taking a look? 😄

@MKleusberg
Copy link
Member

Hmm, this one is more tricky to reproduce and I can't find anything obvious in the logs. Does this happen for any database you try to push? Does it also happen when using DB4S for uploading a database?

And in a fascinating bit of trivia, I discovered that a Google search for "dio push" is not helpful at all.

😂

@larsks
Copy link
Author

larsks commented Mar 19, 2022

This seems to happen with every database I try to push.

E.g., here's a little dummy database:

$ sqlite3 votes.db .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "Session" (
  "session_id" INTEGER PRIMARY KEY AUTOINCREMENT,
  "session_created" DATETIME NOT NULL
);
INSERT INTO Session VALUES(1,'2022-03-18 22:39:08.572473');
INSERT INTO Session VALUES(2,'2022-03-18 22:40:42.679744');
INSERT INTO Session VALUES(3,'2022-03-18 22:42:27.480491');
INSERT INTO Session VALUES(4,'2022-03-18 22:43:54.261444');
CREATE TABLE IF NOT EXISTS "Vote" (
  "vote_id" INTEGER PRIMARY KEY AUTOINCREMENT,
  "session_id" INTEGER NOT NULL REFERENCES "Session" ("session_id"),
  "vote_choice" TEXT NOT NULL
);
INSERT INTO Vote VALUES(1,1,'Cat');
INSERT INTO Vote VALUES(2,4,'Parrot');
DELETE FROM sqlite_sequence;
INSERT INTO sqlite_sequence VALUES('Session',4);
INSERT INTO sqlite_sequence VALUES('Vote',2);
CREATE INDEX "idx_vote__session_id" ON "Vote" ("session_id");
COMMIT;

Using this version of dio:

$ dio version
dio version 0.3.1

I I try to push it...

$ dio push votes.db
Upload failed with an error: HTTP status 500 - '500 Internal Server Error'

...it fails with an internal server error and no additional details.

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