Updated my socket file with Patricks solution in: Socket Error in Library Actions still getting the same error as before in Web server logs:
Here is the connection string
redis://redis
Updated my socket file with Patricks solution in: Socket Error in Library Actions still getting the same error as before in Web server logs:
Here is the connection string
redis://redis
At this point I wonder if the Wappler team changed something in the docker-compose files, namely the network configuration label(s)
Okay I have been doing some more tests and what I seem to be finding is when I deploy it tends to give the error, if I restart the containers using the restart in Wappler it occasionally will start working seems to work more often with debug mode off but could be coincidence.
However if I deploy and get the error simply toggling debug mode in server connect settings either way seems to be getting it working pretty much every time. Thought I’d share incase this was of any use this could all be coincidence etc but worth a shot
Try to edit the docker-compose.yml
file, it should be located in .wappler/targets/{target_name}
.
The file lists all the docker services, under web it has a section depends_on
, add redis to it.
depends_on:
- 'db'
- 'redis'
we will add the dependency automatically in the next update
Edited my docker-compose unfortunately i still receive the same error when i hit deploy
Does it make a connection when you only restart the web-1 image? It just looks like the redis server didn’t start completely when the node server tries to connect to it.
You can test with setting the timeout higher, the default timeout is only 5 seconds.
In the file setup/config.js
line 86, change it to:
const client = createClient({
url: config.redis === true ? 'redis://redis' : config.redis,
socket: {
connectTimeout: 30000
}
});
That should set a timeout of 30 seconds.
Just tested this it manages to connect a lot more now but it did fail once, I have also noticed that a lot of times at the very start of the web server logs there is this error:
This error message below however has only showed once so far with the 30 seconds and tends to now be a successful connect even thought at the very start of the logs is the error (I cleared the logs before each deploy)
What now normally shows even though at the top of the logs has the error (this is very bottom of the logs):
I’ve seen the same errors intermittently with the latest release.
I will set the timeout to 60 seconds for the next update, that should be more than enough for some slow starting redis server.
This should be fixed now in Wappler 5.8.1
Just tested in 5.8.1 it seems to connect at the end of the logs but at the start of web server logs there is still a error message not sure if this will affect anything anything but this is what I see in a deploy in 5.8.1:
This is strart of web server logs
And this is at the bottom so it does connect at the end but the start does have a error still not sure if that is important but just to check
This topic was automatically closed after 46 hours. New replies are no longer allowed.