Mysql Aborted connection - Deploying Strapi app on Cleavr that was previously configured for Heroku

I am trying to setup a Strapi sites and I am getting an error with mysql while connecting

Mysql error log:
[Note] Aborted connection 6659 to db: ‘00000’ user: ‘0000’ host: ‘localhost’ (Got an error reading communication packets)

I tried couple of change max_allowed_packet but it didn’t work.
Do you have any idea what could be the issue ?

Hello @karims and welcome to the Cleavr forum!

I think what actually is going on is that Strapi is looking for some additional info, in this case if you look at PM2 logs you can see:

App keys are required. Please set app.keys in config/server.js (ex: keys: ['myKeyA', 'myKeyB'])\nError: Middleware \"strapi::session\": App keys are required. Please set app.keys in config/server.js (ex: keys: ['myKeyA', 'myKeyB'])\

Was the app previously setup to be deployed via Heroku? We’ve seen Strapi apps in particular that were configured to deploy on Heroku get errors when deploying on Cleavr, usually having to do with some environment variables.

The fix is to either remove the logic looking for the Heroku specific variables, or add the variables to Cleavr in web app > environment section and then redeploy.

I hope this helps!

Thank you so much for your help.
to the environment variables fixed it.
It works great now.
Keep it up, is amazing

Perfect! Yup… If you’re coming from Heroku with a Strapi app, those are typically what need to be added to the environment section in Cleavr.