You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .env.example
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,10 @@ SESSION_SECRET=abcdef1234
3
3
MAGIC_LINK_SECRET=abcdef1234
4
4
ENCRYPTION_KEY=ae13021afef0819c3a307ad487071c06# Must be a random 16 byte hex string. You can generate an encryption key by running `openssl rand -hex 16` in your terminal
5. Open the root `.env` file and generate a new value for `ENCRYPTION_KEY`:
44
+
5. Open it and generate a new value for `ENCRYPTION_KEY`:
45
45
46
46
`ENCRYPTION_KEY` is used to two-way encrypt OAuth access tokens and so you'll probably want to actually generate a unique value, and it must be a random 16 byte hex string. You can generate one with the following command:
47
47
@@ -178,7 +178,6 @@ To run the end-to-end tests, follow the steps below:
When running on a single server, our app can be trusted to manage its own connections - it knows how many are open and can process its internal queue as needed.
149
+
150
+
<Tooltiptip="🐝">Serverless</Tooltip> changes things. Here, many concurrent app instances are started, each unaware of the others' connections. This can lead to a huge - potentially fatal - increase in connections straight to your DB.
151
+
152
+
<Info>
153
+
PostgreSQL has a [default connection limit](https://www.postgresql.org/docs/current/runtime-config-connection.html#:~:text=at%20server%20start.-,max_connections,-(integer)) of 100.
154
+
</Info>
155
+
156
+
**External connection pools** solve this by putting an additional layer between client and server, which essentially works like a message queue that gets processed as limits allow. The clients are blind to this and can keep sending their requests as before.
157
+
158
+
### Enable connection pooling
159
+
160
+
1. Copy and paste the connection string from earlier to `DIRECT_URL`
0 commit comments