Occasional spikes in egress with no user activity
sahildave
HOBBYOP

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

sahildave
HOBBYOP

2 years ago

fa6dbc09-b00a-4968-a736-60d939742cea


sahildave
HOBBYOP

2 years 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,
  },
})

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


sahildave
HOBBYOP

2 years 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. 🙂

1254460052723732500


2 years ago

your custom domain will be with cloudflare and thus protected by them, you need to use cloudflare's nameservers for that.


sahildave
HOBBYOP

2 years ago

Thanks. WIll do this tonight and closely monitor it for the next 2 weeks. 🙂


2 years ago

sounds good!


sahildave
HOBBYOP

2 years 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. 🙏

1264914321142452200


2 years ago

does that project only have those two services?


Loading...