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

Recipes api returns 500 error. Other queries seem fine. #55

Closed
TheHairyGun opened this issue Sep 28, 2023 · 1 comment
Closed

Recipes api returns 500 error. Other queries seem fine. #55

TheHairyGun opened this issue Sep 28, 2023 · 1 comment

Comments

@TheHairyGun
Copy link

192.168.1.102 - - [28/Sep/2023:18:58:10 +0000] "GET /api/v1/foods?page[number]=1&page[size]=12 HTTP/1.1" 200 11706 "http://192.168.1.238/foods" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0" 192.168.1.102 - - [28/Sep/2023:18:58:13 +0000] "GET /recipes HTTP/1.1" 200 15598 "http://192.168.1.238/foods" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0" 192.168.1.102 - - [28/Sep/2023:18:58:13 +0000] "GET /api/v1/recipes?page[number]=1&page[size]=12 HTTP/1.1" 500 6628 "http://192.168.1.238/recipes" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0"

Navigation seems to be fine; however, the api is returning 500 causing recipes page to spool endlessly. Trying to dig up more details, but I'm just now diggin in.

Restarting host & containers doesn't seem to resolve.

Host details:
Operating System: Ubuntu 20.04.5 LTS
Kernel: Linux 5.4.0-163-generic
Architecture: x86-64

Appreciate any help!

@TheHairyGun
Copy link
Author

TheHairyGun commented Sep 29, 2023

I fixed this by deleting the last entry within my recipes database. Not sure what the issue was beyond that, but after some fiddling around I think it might be related to a bad "food" item, so you might need to recreate items which you've used in that recipe.

Command sequence for anyone who experiences this looks roughly like this...

// connect to the docker db instance
$ ssh dockerhost@
$ mysql -u kcal -h 127.0.0.1 -P 3306 -p

// use mysql to delete the problematic entry

use kcal
select * FROM recipes
delete FROM recipes WHERE id=5;

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

1 participant