We have an issue where our app becomes slow and backend api's time out after the update of the app.js file.
We stopped updating this file as part of our Wappler lib updates a couple of weeks ago and today tried to incorporate the update again, but same happend.
We reverted back. Unfortunately app.js does not have a version number, so all I could do is post screenshots of the reverted version on git. Red would be parts of the file that has updates that one or more of the code lines/functions potentially breaks the app. The green is what we reverted to for the app to work gain.
How can we troubleshoot this problem?
1 Like
Something to maybe mention is that we use encrypted environmental variables that we declare in a .env file for the database connection. Maybe this could cause the issue.
It is in the site root.
Seeing the diffs it was an update to make sure that dynamic expressions in database configurations are evaluated per request. In the old situation the expressions in a database connection were only evaluated once at startup of the server.
I didn't expect any mayor slowdowns with this update, what kind of slowdowns do you get? Is there a memory increase, perhaps a memory leak?
Thanks for getting back to us @patrick . We use encrypted environmental variables for the database connection. Example of the username expression:
$_ENV.NODE_ENV==='development'?$_ENV.DB_USERNAME:$_ENV.DB_USERNAME.decrypt($_ENV.KEY)
screenshot of the db connection ui in Wappler:
We will run specific tests by adding the updates again and get back to you asap.