WCI-Computer-Science / WCI-Walks

Walkathon web app maintained by the WCI CS Club
MIT License
4 stars 2 forks source link

Web Requests Interacting with Redis Timeout #39

Open awenelo opened 1 year ago

awenelo commented 1 year ago

After the app has been running for a while, editing a distance or adding a walk causes the request to time out. Removing the lines related to redis appears to fix this issue.

Logs from timed-out request:

2023-05-06T13:27:23.084490+00:00 heroku[router]: at=info method=GET path="/static/menu.png" host=wciwalks.herokuapp.com request_id=f1ba0d86-a47a-4317-9e77-33d3e35f0503 fwd="xxx.xxx.xxx.xxx" dyno=web.1 connect=0ms service=15ms status=304 bytes=176 protocol=https
2023-05-06T13:27:36.657203+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/users/" host=wciwalks.herokuapp.com request_id=b3f0a46e-96a3-49d3-98df-2ed1623e63d1 fwd="xxx.xxx.xxx.xxx" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
2023-05-06T13:27:36.800711+00:00 app[web.1]: [2023-05-06 09:27:36 -0400] [2] [CRITICAL] WORKER TIMEOUT (pid:8)
2023-05-06T13:27:37.804126+00:00 app[web.1]: [2023-05-06 09:27:37 -0400] [2] [WARNING] Worker with pid 8 was terminated due to signal 9
2023-05-06T13:27:37.806599+00:00 app[web.1]: [2023-05-06 09:27:37 -0400] [12] [INFO] Booting worker with pid: 12
2023-05-06T13:27:54.510215+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/users/" host=wciwalks.herokuapp.com request_id=71c983a9-3dd8-4745-a528-7c48c14a42c5 fwd="xxx.xxx.xxx.xxx" dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
2023-05-06T13:27:54.892637+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=wciwalks.herokuapp.com request_id=c59c63ba-1386-4838-af8b-a339aa75b294 fwd="xxx.xxx.xxx.xxx" dyno=web.1 connect=0ms service=34ms status=404 bytes=3477 protocol=https
2023-05-06T13:27:54.893230+00:00 app[web.1]: xxx.xxx.xxx.xxx - - [06/May/2023:09:27:54 -0400] "GET /favicon.ico HTTP/1.1" 404 3301 "https://wciwalks.herokuapp.com/users/" "browserinfo"
2023-05-06T13:27:54.894307+00:00 app[web.1]: [2023-05-06 09:27:54 -0400] [2] [CRITICAL] WORKER TIMEOUT (pid:9)
2023-05-06T13:27:55.897709+00:00 app[web.1]: [2023-05-06 09:27:55 -0400] [2] [WARNING] Worker with pid 9 was terminated due to signal 9
2023-05-06T13:27:55.900236+00:00 app[web.1]: [2023-05-06 09:27:55 -0400] [13] [INFO] Booting worker with pid: 13
2023-05-06T13:27:17.000000+00:00 app[heroku-redis]: source=REDIS addon=redis-flat-x sample#active-connections=1 sample#load-avg-1m=0.115 sample#load-avg-5m=0.14 sample#load-avg-15m=0.14 sample#read-iops=0 sample#write-iops=0.21212 sample#memory-total=16082932kB sample#memory-free=10035948kB sample#memory-cached=4153096kB sample#memory-redis=336840bytes sample#hit-rate=0.00060826 sample#evicted-keys=0
awenelo commented 1 year ago

This only appears to happen a couple times, then requests don't timeout anymore - is something falling asleep that shouldn't?