Multiple update queries are triggered for `strapi_core_store_settings` on application start

Hi All,

Whenever we deploy new changes to our production, we see this particular query it triggered continuously,

info: select ‘t0’.‘value’ from ‘strapi_core_store_settings’ as ‘t0’ where (‘t0’.‘key’ = ‘ee_information’) limit 1 for update

Because of this query, the active sessions in our CMS DB goes way above and makes our application traffic down. Even if we kill those session, they just keep coming up again.

Is there anyway we can come over this issue?

Thanks

Strapi Enterprise Edition
Strapi version: v4.10.5

Node version: v18.13.0

Database: MySQL

2 Likes

+1 - Any help on this issue will be highly appreciated

1 Like

We also facing the same issue. The issue started after upgrading to the latest version.

Anyone from strapi team, can you please guide

@Renuchand_CR @sumodnair @Akshay
If all 3 of you have enterprise or strapi clould please open a issue on cloud or the support for none cloud enterprise

I will also open a github issue about this

Whenever we deploy new changes to our production, we see this particular query it triggered continuously,

Hello :slight_smile:

Could you specify approximately the period you see that particular query being triggered? Multiple times a second, once a second, …?

It could help identify where it’s being triggered

Could I also ask, are you horizontally scaling strapi or using strapi cloud?

And also, Which version were you using before?

Connecting to a mysql DB I only see 11 active sessions that keept open (seems ok). And I don’t see the ee_information query being triggered multiple times or stucked.

We need more information, I can only think of horizontal scaling and getting to 151 connections (max of mysql by default)

I can chime in to give some more information about what @Renuchand_CR is mentioning:

The ee_information query seem to be related to the online license verification that strapi implements, here’s a PR:

(Line 64 of packages/core/strapi/ee/index.js file)

So, I did some digging and testing and ended up putting the following configurations in config/admin.js and config/server.js of our strapi project:

  • isEE: false
  • EE: false
  • projectType: ‘Community’

I also removed every mention of the STRAPI_LICENSE variable in our env and added one (I think not needed) new env variable STRAPI_DISABLE_EE as true.

With these changes, that ee_information query does not trigger. We haven’t tested this yet as we are gathering more information still, but it’s important to mention that this started to happen after the upgrade from strapi 4.5.5 to 4.10.5; Also our DB seem to be choking with 20 sessions opened at any given moment and it takes time for them to go down.

These configs also were implemented in config/database.js but they did not help at all, so we reverted them:

  pool: {
    max: 7,
    idleTimeoutMillis: 15000
  }

Edit: My suspicion, (if this is really related to the license query) is that maybe as our license is expired and we have not updated the datum of the new license (we don’t seem to have it at hand yet) then… the service is retrying multiple times? but we’re not sure this is the real main issue.

If you did not already do this please open also a issue trough strapi EE support about this.
Since strapi can’t get any suport witout a EE ticket open on EE fetures

It seems like our license has expired and no plans of renewing it in sight? So… taking that into consideration, does the suggestion above seems like something feasible? or do you see any other change needed different from disabling the license check?

If your license is expired then you should remove it. If we don’t detect a license (valid or not) then none of the license verification code will be called.

Thanks @DMehaffy . After updating the Enterprise Edition flags to false, we are not facing the issue currently.