R
Railwayβ€’6mo ago
sahiltheway

Occasional spikes in egress with no user activity

I have a Strapi project, and have been getting sudden spikes in egress of 800+ MB, almost everyday. My product does not get any visitors yet, which is evident in my analytics. Attaching images of the spike, logs and screenshot of analytics. How can I find out what's going on?
No description
No description
Solution:
id recommend putting your app behind cloudflare and removing the railway provided domain, that way you can adjust policies in cloudflare to your needs
Jump to solution
11 Replies
Percy
Percyβ€’6mo ago
Project ID: fa6dbc09-b00a-4968-a736-60d939742cea
sahiltheway
sahilthewayOPβ€’6mo ago
fa6dbc09-b00a-4968-a736-60d939742cea
sahiltheway
sahilthewayOPβ€’6mo ago
I am connecting with the database private url
module.exports = ({ env }) => ({
connection: {
client: "postgres",
connection: {
connectionString: env("DATABASE_PRIVATE_URL"),
host: env("DATABASE_HOST"),
port: env("DATABASE_PORT"),
database: env("DATABASE_NAME"),
user: env("DATABASE_USERNAME"),
password: env("DATABASE_PASSWORD"),
ssl: {
rejectUnauthorized: env.bool("DATABASE_SSL_SELF", false),
},
},
debug: false,
},
})
module.exports = ({ env }) => ({
connection: {
client: "postgres",
connection: {
connectionString: env("DATABASE_PRIVATE_URL"),
host: env("DATABASE_HOST"),
port: env("DATABASE_PORT"),
database: env("DATABASE_NAME"),
user: env("DATABASE_USERNAME"),
password: env("DATABASE_PASSWORD"),
ssl: {
rejectUnauthorized: env.bool("DATABASE_SSL_SELF", false),
},
},
debug: false,
},
})
Ref: https://docs.strapi.io/dev-docs/configurations/database#connection-parameters
Database | Strapi Documentation
Strapi offers a single entry point file to configure its databases.
Brody
Brodyβ€’6mo ago
could be bots or scanners, unfortunately some http based access logs are not going to provide you with enough insight.
Solution
Brody
Brodyβ€’6mo ago
id recommend putting your app behind cloudflare and removing the railway provided domain, that way you can adjust policies in cloudflare to your needs
sahiltheway
sahilthewayOPβ€’6mo ago
Thanks for the answer Brody! I generally use a custom domain in any public call. Your suggestion will be to put this custom domain behind cloudflare and use the URL provided by them in my API calls? Apologies if this is too basic, but I am doing it for the first time. πŸ™‚
No description
Brody
Brodyβ€’6mo ago
your custom domain will be with cloudflare and thus protected by them, you need to use cloudflare's nameservers for that. https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/
sahiltheway
sahilthewayOPβ€’6mo ago
Thanks. WIll do this tonight and closely monitor it for the next 2 weeks. πŸ™‚
Brody
Brodyβ€’6mo ago
sounds good!
sahiltheway
sahilthewayOPβ€’5mo ago
Hi. I am still getting high egress cost. I have internal database url, but it looks like "Egress" is coming from the strapi project. I'd love to get a direction to look in. πŸ™
No description
Brody
Brodyβ€’5mo ago
does that project only have those two services?
Want results from more Discord servers?
Add your server