Search code examples
ruby-on-railsmongodbelasticsearchherokuredis

API endpoints returning 500 err after deploy on Heroku


The API endpoint is working fine on my local machine but when I deploy my Rails project to Heroku, some endpoints are returning 500 Internal Server Error. My tech pack is below, because I could not find a way to watch Rails log messages on Heroku, I could not share anym detailed information. What can be helpful for me is general answers for 500 error, like what could cause this and maybe a way of inspecting Rails log messages on Heroku. Thanks.

MongoDB, ElasticSearch, Redis, Swagger

The error message on Heroku logs is Completed 500 Internal Server Error in 27ms (MongoDB: 0.0ms)

Additionally, on my local I get the following error but the endpoint is returning 200 OK. HTTP parse error, malformed request ()


Solution

  • I realized that the problem is BONSAI connection on ElasticSearch Gem is not supported on versions > 7.13