Open BunlongOung opened 2 years ago
Do you know the location/region of your Firestore database and your server (I'm assuming it's Cloud Run)?
There are many round-trip requests between the server and Firestore for each request to the server, particularly during startup of the server (it checks or creates roles and permissions for every data type, which can be hundreds or thousands).
So you should make sure that the server and the Firestore database are running in the same region/location.
@BunlongOung any update on this issue based on my previous comments?
@brettwillis Apologize for the inactivity. My instance and Firestore database are all in asia-southest
but the slowness is still exist.
Could you set logTransactionStats
and logQueries
to true
as explained here, and provide the log/console output of the initial Strapi startup (which you say takes ~1.5min).
This will show me what database transactions are going on to provide more context.
// ./config/database.js
module.exports = ({ env }) => ({
defaultConnection: 'default',
connections: {
default: {
connector: 'firestore',
settings: {
projectId: '{YOUR_PROJECT_ID}',
},
options: {
...
logTransactionStats: true,
logQueries: true,
}
}
},
});
While developing with Firebase Emulators, everything is going smoothly. Currently my project development is almost done and I'm working on the deployment, The loading is extremely slow. It took 1.5min to load after signed in. I've tried with my local Strapi with remote firebase and the result is also slow.
Strapi: 3.6.5 strapi-connector-firestore: 3.0.0-alpha.46