Skip to content

Profile Update Not Working with Heroku #28

@RyanBeiden

Description

@RyanBeiden

Bug Description

When making a PUT request to profiles/2 in order to update the profile_img for a shopper, the following error occurs:

2021-03-19T02:58:30.473828+00:00 app[web.1]: 10.97.137.170 - - [19/Mar/2021:02:58:30 +0000] "PUT /profiles/2 HTTP/1.1" 500 145 "-" "PostmanRuntime/7.26.10"
2021-03-19T02:58:30.507039+00:00 heroku[router]: sock=backend at=error code=H18 desc="Server Request Interrupted" method=PUT path="/profiles/2" host=cmd-food.herokuapp.com request_id=69ced630-c8e5-4233-80cd-a12932bbbaa1 fwd="45.132.115.51" dyno=web.1 connect=0ms service=428ms status=503 bytes=410 protocol=https

Steps to Reproduce:

  1. Run a PUT request in Postman to /profiles/2. The request can be found already made in the Live collection.
  2. Run heroku logs --tail in there terminal to locate the error code.

Dev Notes

  • I would start by removing the line of the update method in profile.py that uploads to Cloudinary, then push that to Heroku and try again. If it works, there's most likely an issue with Cloudinary upload from Heroku.
  • Also, the error code H18 means the following:
Server Request Interuppted
An H18 signifies that the socket connected, some data was sent as part of a response by the app, but then the socket was destroyed without completing the response.
  • This is why I believe the issue is with uploading to Cloudinary takes time and may be timing out.
  • See this reference.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions