dio icon indicating copy to clipboard operation
dio copied to clipboard

dio push fails with 500 internal server error

Open larsks opened this issue 3 years ago • 3 comments

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.

larsks avatar Mar 14 '22 14:03 larsks

@MKleusberg Any interest in taking a look? :smile:

justinclift avatar Mar 14 '22 20:03 justinclift

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.

:joy:

MKleusberg avatar Mar 19 '22 20:03 MKleusberg

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.

larsks avatar Mar 19 '22 23:03 larsks