title: Heroku crashes when I try to login or register new user
body: <p>My application works perfectly fine when used locally, but when using Heroku I fail to register, or login. Below is the errors I have had:</p>
  <pre><code>2022-04-14T09:42:38.162125+00:00 heroku[router]: at=info method=GET path=&quot;/&quot; host=crypto-emissions-calculator.herokuapp.com request_id=9c770e38-15d6-4aec-8ea7-cc88a54d81f3 fwd=&quot;86.26.128.27&quot; dyno=web.1 connect=0ms service=11ms status=302 bytes=402 protocol=https
  2022-04-14T09:42:38.202179+00:00 heroku[router]: at=info method=GET path=&quot;/accounts/login&quot; host=crypto-emissions-calculator.herokuapp.com request_id=6b4c5157-b8bd-4f8d-9f2c-6cfcdeb70023 fwd=&quot;86.26.128.27&quot; dyno=web.1 connect=0ms service=13ms status=304 bytes=151 protocol=https
  2022-04-14T09:42:38.309361+00:00 heroku[router]: at=info method=GET path=&quot;/css/index.css&quot; host=crypto-emissions-calculator.herokuapp.com request_id=926d9066-9c0b-4be3-8771-6cc7d8c022c2 fwd=&quot;86.26.128.27&quot; dyno=web.1 connect=0ms service=13ms status=200 bytes=812 protocol=https
  2022-04-14T09:42:59.201019+00:00 app[web.1]: MongooseError: Operation `users.findOne()` buffering timed out after 10000ms
  2022-04-14T09:42:59.201032+00:00 app[web.1]:     at Timeout.&lt;anonymous&gt; (/app/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:151:23)
  2022-04-14T09:42:59.201033+00:00 app[web.1]:     at listOnTimeout (node:internal/timers:559:17)
  2022-04-14T09:42:59.201033+00:00 app[web.1]:     at processTimers (node:internal/timers:502:7)
  2022-04-14T09:43:19.179894+00:00 heroku[router]: at=error code=H12 desc=&quot;Request timeout&quot; method=POST path=&quot;/accounts/login&quot; host=crypto-emissions-calculator.herokuapp.com request_id=7329069b-ee04-4793-ac69-4a91c069abd2 fwd=&quot;86.26.128.27&quot; dyno=web.1 connect=0ms service=30000ms status=503 bytes=0 protocol=https
  </code></pre>