2 years ago
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?
10 Replies
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,
},
})Ref: https://docs.strapi.io/dev-docs/configurations/database#connection-parameters
2 years ago
could be bots or scanners, unfortunately some http based access logs are not going to provide you with enough insight.
2 years 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
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. 🙂

2 years ago
your custom domain will be with cloudflare and thus protected by them, you need to use cloudflare's nameservers for that.
Thanks. WIll do this tonight and closely monitor it for the next 2 weeks. 🙂
2 years ago
sounds good!
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. 🙏

2 years ago
does that project only have those two services?