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

Unable to query the Thimble database from our sweet dashboard. #232

Closed
flukeout opened this issue Nov 7, 2015 · 11 comments
Closed

Unable to query the Thimble database from our sweet dashboard. #232

flukeout opened this issue Nov 7, 2015 · 11 comments
Milestone

Comments

@flukeout
Copy link

flukeout commented Nov 7, 2015

The dashboard lives on: https://thimble-dashboard-staging.herokuapp.com/

Some queries seem to work, though. Check out below

  • The graph is blank, it tries to query the projects table
  • The thumbnails are populated, they are obtained by querying the publishedProjects table

Are there different permissions set on this?

image

I'm also unable to connect to the database at all from my desktop database app.

@jbuck Are there some new security rules that are preventing my app from working?

cc @humphd @sedge

@humphd
Copy link
Collaborator

humphd commented Nov 7, 2015

This is what I reported in the Thimble bug, and it's just 503'ing:

curl -I https://thimble-dashboard-staging.herokuapp.com/count-created\?date\=2015+11+05
HTTP/1.1 503 Service Unavailable
Connection: keep-alive
Server: Cowboy
Date: Sat, 07 Nov 2015 18:07:00 GMT
Content-Length: 484
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache, no-store

@sedge
Copy link
Contributor

sedge commented Nov 8, 2015

The attempt to connect to postgres fails with an ETIMEDOUT error. A ping to the database confirms the service is active, as does the fact that Thimble still runs.

@jbuck Are we hitting a limit on the number of clients that can connect at once? I wonder how often clients are released back into the pool.

@sedge
Copy link
Contributor

sedge commented Nov 8, 2015

The dashboard creates a new client connection for every request. That might cause issues if there's a limited number of clients connections available.

@jbuck jbuck modified the milestones: Countdown to MozFest, Next Tasks, 0xDEADBEEF Nov 9, 2015
@flukeout
Copy link
Author

Actually, it looks like some of the queries I was using are no longer working, so there may be something else at play...

image

@humphd
Copy link
Collaborator

humphd commented Nov 16, 2015

@flukeout there was work to convert date types, which might be what this is? cc @gideonthomas

@flukeout
Copy link
Author

@Pomax @gideonthomas It looks like some Thimble projects have made it into the projects table, and they have a different date format for date_create and date_updated than existing Thimble projects. This is causing my queries to break and the dashboard to not work.

image

What's the plan on this? Will they be the same ultimately? Should I account for this somehow in my dashboard code?

cc @chadsansing

@gideonthomas
Copy link
Contributor

@flukeout I'm working on a patch that will store them as datetime sql types so that should fix this. I'm not sure what caused it to have epoch-based time though (seems like they all have "X-Ray Goggles" in their name so maybe that has something to do with it :P)

@Pomax
Copy link
Contributor

Pomax commented Nov 19, 2015

https://github.com/mozilla/goggles.webmaker.org/blob/master/views/publication.js#L278-L286 looks like the culprit. Another reason why publish.wmo, not clients, should control creation and update dates =)

@jbuck jbuck modified the milestones: 0xDEADBEEF, Pre-Mozlando Nov 23, 2015
@jbuck
Copy link
Contributor

jbuck commented Nov 24, 2015

Okay, so it sounds like this is just a "unexpected data in the database" issue causing the query to not work, right? As opposed to not having access or something like that

@jbuck
Copy link
Contributor

jbuck commented Dec 1, 2015

I think @gideonthomas will fix this when he lands his date handling patch. In the meantime, you could patch goggles to send date strings instead of unix timestamps, and use sql to convert the existing timestamps to iso strings.

@jbuck jbuck closed this as completed Dec 1, 2015
@Pomax
Copy link
Contributor

Pomax commented Dec 2, 2015

filed mozilla/goggles.mozilla.org#257 to track that over on the goggles repo

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

6 participants