codeforamerica / OpenTrails

OpenTrails (Open Trail System Specification) Converter & Validator
http://open-trails.herokuapp.com/
39 stars 9 forks source link

Produce helpful error message on upload timeout failure #65

Open alanjosephwilliams opened 10 years ago

alanjosephwilliams commented 10 years ago

On the production open-trails.herokuapp.com (but not locally), the Validator crashes when the the full set of OpenTrails data describing the Ohio system (which is 1.6 MB, with all five files included) is uploaded.

screenshot 2014-07-12 15 11 15

migurski commented 10 years ago

I wasn't able to replicate this bug on the live site or my local copy.

alanjosephwilliams commented 10 years ago

Based on the Heroku logs, and my ability to reproduce only on public connections (like hotel lobbies), it appears to be a timeout issue:

2014-07-13T14:44:58.251582+00:00 app[web.1]: 2014-07-13 14:44:58 [2] [CRITICAL] WORKER TIMEOUT (pid:25) 2014-07-13T14:44:58.264830+00:00 app[web.1]: 2014-07-13 14:44:58 [42] [INFO] Booting worker with pid: 42 2014-07-13T14:44:58.259190+00:00 app[web.1]: 2014-07-13 14:44:58 [2] [CRITICAL] WORKER TIMEOUT (pid:25)

We should make this failure more graceful. @ondrae what was your suggestion from earlier going to be?

ondrae commented 10 years ago

You can upload direct to S3 from the client instead of to Heroku first. There might some way to put it into a separate process too.

You can notify the user when the file is uploaded, or just show it on screen when its finished.

migurski commented 10 years ago

Direct to S3 is probably the way to go here. The feature is called something like Signed POST, and triggers a callback. A smart thing to use, and cuts down on one complete round trip.

migurski commented 10 years ago

I’ve implemented this before in PHP, can help as needed.

alanjosephwilliams commented 10 years ago

This seems like an improvement that may be warranted in advance of UC—I can imagine audience members attempting to upload data right there during or after the talk, and hitting the timeout on wifi saddled with untold numbers of conference goers.

Take this one as you see fit @migurski.

On Mon, Jul 14, 2014 at 6:50 PM, migurski notifications@github.com wrote:

I’ve implemented this before in PHP https://github.com/migurski/paperwalking/blob/master/site/lib/data.php#L1191, can help as needed.

— Reply to this email directly or view it on GitHub https://github.com/codeforamerica/PLATS/issues/65#issuecomment-48925264.

t: @alanjosephwilli p: 817 713 6264

migurski commented 10 years ago

Good point, I will attempt to implement this.