Miał ktoś może problem, żeby podłączyć się z heroku do MongoDB ? Lokalnie wszystko mi działa. Po deployu na heroku apki leci timeout:
at=error code=H12 desc="Request timeout" method=GET path="/events/ALL" host=_host_ dyno=web.1 connect=1ms service=30001ms status=503 bytes=0 protocol=https
2019-10-11T19:03:43.93031+00:00 app[web.1]: 2019-10-11 19:03:43.929 ERROR 4 --- [io-56463-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Timed out after 30000 ms while waiting for a server that matches com.mongodb.client.internal.MongoClientDelegate$1@3dfddaca. Client view of cluster state is {type=REPLICA_SET, servers=[{address=_host_, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}
EDIT. Zadziałało dodanie 0.0.0.0/0 do białej listy mongo :)