Keep losing connecting to the database and can not remove the disabled connections Node.js

I am having a hell of a time with the database connection just not working, or losing the connection and then not being able to remove them.

Yes it is set correctly in the settings, using docker and can get to it just fine using the same settings using Navicat no problem at all!

Anyone else having issues? Driving me up the wall!

Restarted and loaded up again I connect it works for a bit and then stops and then I the connection but it stays. So I create another and it works for a bit then it dies.

I check the database connection other than settings in the database manager and the port keeps reverting to port 3306.

I have no idea what is going on! Meanwhile Navicat connecting is fine, database is as expected.

After adding in the database for a third time I now can not refer to it in the server actions:

After Restarting again I was able to Delete the most recent one and connect the other two :flushed:

Tried deleting one of the other connections so I would just have the one “db” as above, but it wont delete.

Getting this error when submitting form data to the database:

  1. {status: "500", code: "ECONNREFUSED", message: "connect ECONNREFUSED 172.23.0.2:9906",…}
  2. code: "ECONNREFUSED"
  3. message: "connect ECONNREFUSED 172.23.0.2:9906"
  4. stack: "Error: connect ECONNREFUSED 172.23.0.2:9906↵ at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)"
  5. status: "500"

Restarted Wappler, redeployed and same error

OK Anyone has the same issue I followed the process here and it worked!!!

You shouldn’t change the options generated by docker. They are all good.

You have two separate connections - one direct connection for Wappler that uses the external port 9906 on your localhost

And one internal to db for server connect that uses the internal port 3306 on the internal host called db

So it docker is deployed and the services started without errors - those should be just available to connect to.

The exactly with internal 3306 was for MySQL if you use Postgres it is different 5432

External is still 9906

But again it is all generated for you so you don’t have to change anything.

So just open your project settings and reapply them so that the right settings get generated and do not change them afterwards.

Also make sure the development target is selected as active target.

Deploy and the database will be up and running.

Hi @George tried everything and found someone who had similar connection error as above. I followed the direction in that use case and it fixed it for me.

again if you just used the defaults and made sure it is all deployed it will all work automatically.
But if you and change a lot of settings by the hand then things can get messed up. While maybe you just had the wrong target are the services weren’t started by deploying them.

anyway glad it works now.