---
title: "Comment by Franco Ezequiel Ferrario on \"Build a URL Shortener with FastAPI, MongoDB and Python\" | Hashnode"
description: "Hi, i&#39;m having a problem with this. When I try to save in the DB, get this error message: pymongo.errors.ServerSelectionTimeoutError: connection closed, con"
url: "https://hashnode.com/posts/build-a-url-shortener-with-fastapi-mongodb-and-python/600d6b123fdbb7412625f7bc/comment/60b8f884d7e1e779f671bbe3"
---

[Discussion](https://hashnode.com/posts/build-a-url-shortener-with-fastapi-mongodb-and-python/600d6b123fdbb7412625f7bc)

Comment [Build a URL Shortener with FastAPI, MongoDB and Python](https://hashnode.com/posts/build-a-url-shortener-with-fastapi-mongodb-and-python/600d6b123fdbb7412625f7bc)

[Franco Ezequiel Ferrario](https://hashnode.com/@FranF15)

[Jun 3, 2021](https://hashnode.com/posts/build-a-url-shortener-with-fastapi-mongodb-and-python/600d6b123fdbb7412625f7bc/comment/60b8f884d7e1e779f671bbe3)

Hi, i'm having a problem with this. When I try to save in the DB, get this error message:

```
pymongo.errors.ServerSelectionTimeoutError: connection closed,connection closed,connection closed, Timeout: 30s, Topology Description: <TopologyDescription id: 60b8f7ddd8d37c78c48ec0ed, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('cluster0-shard-00-00.n4dkx.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('connection closed')>, <ServerDescription ('cluster0-shard-00-01.n4dkx.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('connection closed')>, <ServerDescription ('cluster0-shard-00-02.n4dkx.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('connection closed')>]>
```

Can you help me?
