jmesserli/svmeal-api

Does not work anymore

rainerduffner opened this issue · 8 comments

Hi,

due to reorganizations of the web-site, it seems the code does not work anymore.

Unfortunately, people are still hammering the website with it.

The code should have had measures in place to prevent this IMO.

Hi. Currently, the SV website itself is returning an error 500 for the restaurant search endpoint:
image
(it doesn't work on the SV page either).

I do agree that the server should not be hammered when it's malfunctioning. I'll look into using a circuit breaker.

IP1 - - [12/Oct/2020:10:58:49 +0200] "POST /de/mitarbeiterrestaurants/restaurant-suche/?type=8700 HTTP/1.1" 404 56496 "-" "sv-meal/2 github.com/jmesserli/svmeal-api"
IP1 - - [12/Oct/2020:10:58:52 +0200] "POST /de/mitarbeiterrestaurants/restaurant-suche/?type=8700 HTTP/1.1" 404 56504 "-" "sv-meal/2 github.com/jmesserli/svmeal-api"
IP2 - - [12/Oct/2020:10:58:56 +0200] "POST /de/mitarbeiterrestaurants/restaurant-suche/?type=8700 HTTP/1.1" 301 178 "-" "sv-meal/2 github.com/jmesserli/svmeal-api"
IP1 - - [12/Oct/2020:10:59:09 +0200] "POST /de/mitarbeiterrestaurants/restaurant-suche/?type=8700 HTTP/1.1" 404 56504 "-" "sv-meal/2 github.com/jmesserli/svmeal-api"
IP1 - - [12/Oct/2020:10:59:12 +0200] "POST /de/mitarbeiterrestaurants/restaurant-suche/?type=8700 HTTP/1.1" 404 56496 "-" "sv-meal/2 github.com/jmesserli/svmeal-api"
IP1 - - [12/Oct/2020:10:59:29 +0200] "POST /de/mitarbeiterrestaurants/restaurant-suche/?type=8700 HTTP/1.1" 404 56504 "-" "sv-meal/2 github.com/jmesserli/svmeal-api"
IP1 - - [12/Oct/2020:10:59:32 +0200] "POST /de/mitarbeiterrestaurants/restaurant-suche/?type=8700 HTTP/1.1" 404 56544 "-" "sv-meal/2 github.com/jmesserli/svmeal-api"

I've complained to their ISPs. Maybe I should just ban them...

I've taken my instance down for now. That would have been 37.120.166.80 - I hope it wasn't me.

You were IP2....

IP1 is still active.

Sorry about that.

I'm currently implementing the circuit breaker, and it seems to be working so far.
image

I currently have it configured to break open after 10 failed calls, after which it will not do any calls for 5 minutes.
Does that sound sensible to you?

I've pushed a fix including the circuit breaker.

And I've also contacted someone that I think is also running the software on their end. Hopefully, they can integrate the fix soon.

The hammering seems to have stopped, thank you.

I'm closing this issue for now. If future problems arise, feel free to open an issue again.