tosdr / edit.tosdr.org

👍👎 A new web app to rate services
https://edit.tosdr.org
GNU Affero General Public License v3.0
213 stars 37 forks source link

Phoenix API results in server error #938

Closed JustinBack closed 3 years ago

JustinBack commented 3 years ago

Wether indexing or retrieving points or services, the results all end in a Server Error grafik

cherryblossom000 commented 3 years ago

I'm not sure if this related but a 503 error occurs with https://edit.tosdr.org/services/list_all. Because this is used by https://edit.tosdr.org/services viewing the services doesn't work:

screenshot of failed network request

Response ```html Application Error ```
JustinBack commented 3 years ago

I'm not sure if this related but a 503 error occurs with https://edit.tosdr.org/services/list_all. Because this is used by https://edit.tosdr.org/services viewing the services doesn't work:

screenshot of failed network request

Response

Could be that rails or heroku is slow, we have that issue a lot

madoleary commented 3 years ago

Hey there, sorry about the delay. It's been fixed.

madoleary commented 3 years ago

Just for posterity, list_all and the services index endpoint for the API are two different things. Indeed, there are quite a lot of service objects being called up at once from the database when that page is loaded. It certainly tends to slow things down. In the near future I'd like to implement a type of progressive scroll, so that the services are loaded as the user's eye-line moves down the page.

JustinBack commented 3 years ago

Well services are working properly now however point indexes are still broken grafik

madoleary commented 3 years ago

Reopened the issue, will deploy a fix shortly.

madoleary commented 3 years ago

It's working now; the JSON response is enormous. Would some type of pagination be useful? Leaving this open for other API suggestions.

JustinBack commented 3 years ago

Yes pagination would be useful or a ?limit= parameter, would also need the max page count in the json then

madoleary commented 3 years ago

Sure, I'm not gonna be able to get to it tonight, but I will work on it this week.

On Mon, Nov 9, 2020 at 6:34 PM Justin René Back notifications@github.com wrote:

Yes pagination would be useful or a ?limit= parameter, would also need the max page count in the json then

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/tosdr/edit.tosdr.org/issues/938#issuecomment-724162016, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJJU6FN35WEVVEGRCHHOF3SPARYVANCNFSM4TAJKZZA .

JustinBack commented 3 years ago

Alright, no worries. Not in need of it right now, we need a case api though. I have opened an issue for this #941

madoleary commented 3 years ago

Oh, okay. I can get to that, also.