Long Deploy Time (Docker)

I ran at and waited around 5 min it hasn’t sent anything back. I tried again for a few min and nothing.

Not sure if this is right since I don’t understand most of the backend stuff, but I tried the tail -50 with the location from error and it says no file or directory.

@Teodor @patrick Could one of you take a look at this thread and see if you have any solutions?

Can you try this command:

find / -path "*/root/.npm/_logs/2023-02-26T06*"

I added a wildcard in the end

Got this

root@test:~# find / -path "*/root/.npm/_logs/2023-02-26T06*"
/var/lib/docker/overlay2/rbojk5oc35cqi15zqzac5c9nd/diff/root/.npm/_logs/2023-02-26T06_06_57_638Z-debug-0.log
/var/lib/docker/overlay2/v4qdd6vkjqqphq7sle9hxkmet/diff/root/.npm/_logs/2023-02-26T06_08_14_114Z-debug-0.log
/var/lib/docker/overlay2/sfwc5pen6zrnzpuz1k68z6kb8/diff/root/.npm/_logs/2023-02-26T06_05_50_611Z-debug-0.log
/var/lib/docker/overlay2/7nyjt01ncdvw3k0g94q01t8l0/diff/root/.npm/_logs/2023-02-26T06_13_55_011Z-debug-0.log
/var/lib/docker/overlay2/axlspjk2c7evigc94skc2862t/diff/root/.npm/_logs/2023-02-26T06_32_12_566Z-debug-0.log
/var/lib/docker/overlay2/a285dd572d59805aa8ccf85d705122c0eb544fc11506e981adddcff85d6ae788/merged/root/.npm/_logs/2023-02-26T06_32_12_566Z-debug-0.log

Ok, run this command:

tail -50 /var/lib/docker/overlay2/a285dd572d59805aa8ccf85d705122c0eb544fc11506e981adddcff85d6ae788/merged/root/.npm/_logs/2023-02-26T06_32_12_566Z-debug-0.log
root@test:~# tail -50 /var/lib/docker/overlay2/a285dd572d59805aa8ccf85d705122c0eb544fc11506e981adddcff85d6ae788/merged/root/.npm/_logs/2023-02-26T06_3
2_12_566Z-debug-0.log
2028 silly ADD node_modules/unzipper/node_modules/readable-stream
2029 silly ADD node_modules/unzipper/node_modules/bluebird
2030 silly ADD node_modules/socket.io
2031 silly ADD node_modules/session-file-store
2032 silly ADD node_modules/session-file-store/node_modules/universalify
2033 silly ADD node_modules/session-file-store/node_modules/jsonfile
2034 silly ADD node_modules/session-file-store/node_modules/fs-extra
2035 silly ADD node_modules/qs
2036 silly ADD node_modules/nodemon
2037 silly ADD node_modules/nodemon/node_modules/has-flag
2038 silly ADD node_modules/nodemon/node_modules/supports-color
2039 silly ADD node_modules/nodemon/node_modules/debug
2040 silly ADD node_modules/node-schedule
2041 silly ADD node_modules/mime-types
2042 silly ADD node_modules/knex
2043 silly ADD node_modules/fs-extra
2044 silly ADD node_modules/follow-redirects
2045 silly ADD node_modules/express-session
2046 silly ADD node_modules/express-session/node_modules/ms
2047 silly ADD node_modules/express-session/node_modules/safe-buffer
2048 silly ADD node_modules/express-session/node_modules/debug
2049 silly ADD node_modules/express-session/node_modules/cookie
2050 silly ADD node_modules/express-fileupload
2051 silly ADD node_modules/express-end
2052 silly ADD node_modules/express-end/node_modules/ms
2053 silly ADD node_modules/express-end/node_modules/debug
2054 silly ADD node_modules/express
2055 silly ADD node_modules/express/node_modules/ms
2056 silly ADD node_modules/express/node_modules/safe-buffer
2057 silly ADD node_modules/express/node_modules/debug
2058 silly ADD node_modules/express/node_modules/cookie
2059 silly ADD node_modules/ejs
2060 silly ADD node_modules/dotenv
2061 silly ADD node_modules/debug
2062 silly ADD node_modules/cors
2063 silly ADD node_modules/cookie-parser
2064 silly ADD node_modules/connect-session-knex
2065 silly ADD node_modules/compression
2066 silly ADD node_modules/compression/node_modules/ms
2067 silly ADD node_modules/compression/node_modules/debug
2068 silly ADD node_modules/archiver
2069 timing command:install Completed in 350335ms
2070 notice
2070 notice New major version of npm available! 8.19.3 -> 9.5.1
2070 notice Changelog: <https://github.com/npm/cli/releases/tag/v9.5.1>
2070 notice Run `npm install -g npm@9.5.1` to update!
2070 notice
2071 verbose exit 0
2072 timing npm Completed in 350660ms
2073 info ok

So, it looks like that log file isn’t the errored one we’re looking for, the filename differs from your last screenshot showing the error :frowning:

But then, the find command didn’t find the one exactly we’re looking for. Not sure if you’re doing it on another VPS, or if Docker automatically erased the contents because it failed to run with success

Everything after you mentioned switching VPS locations has been on the same VPS, the one in Frankfurt.

Everything has been done in Wappler, in a new project. The server creation, the SSH commands, etc.

Ok, sounds like you’ll have to wait till Monday for the Wappler team to get back to you, don’t think I can help you further. Good luck!

1 Like

No problem, thanks a bunch for trying to help!

Well after reviewing all of the above, I don’t think there is anything wrong with the deployment but just the connectivity of the server.

When switching to different location did it help?

What provider and location are you using?

Maybe you can also file a ticket at your provider so they can have a look at this.

Switching server seemed to have the same effect. It worked at first but after I added Portainer and Traefik it slowed way down.

I am using DigitalOcean droplets setup through Wappler.

My initial project was to New York(NYC1) and the one I made during this thread to test things was set to Frankfurt(FRA1).

On DigitalOcean I see “Open incident Network Connectivity in the APAC region”, but that shouldn’t affect me.

The only things I am using are Wappler and DigitalOcean(managed through the Wappler resource manager). And I suspose NameCheap for my domain which is pointed at DigitalOcean.

I don’t know if the portainer and traefik could cause a problem but that is when I first notice the problem. Could I be setting them up wrong?

It might be worth noting that I had trouble setting up Traefik.

and couldn’t use the wildcard when setting up the domain like shown in the docs.

How did you create your server in Wappler? With the docker machine settings in the target or from the new Resource Manager?

I made it in the resource manager. After adding DigitalOcean as a cloud provider I right clicked on server and create new.

After it was created I made a new target with server type docker, remote. And then in “Cloud Providers - SSH” I selected the server I made.

Could you maybe try to create a new server with the old Docker Machines setup in the Project Targets Settings? and deploy to it - see if it makes any difference?

Just created one


and initial deploy worked and took roughly a minute.

Will try to redeploy a few times and then add portainer and traefik.
If I want to add those on the old way I need to do it via


correct?

And not that it really matters but making it this way shows the cost is $5 while with resource manager it is $4, not sure if that is intended.

correct, that is the way to add traefik there.

Costs are approx and maybe a bit outdated, you can see that best on the digital ocean own dashboard.

I did 3 deploys on the this setup, just changing some text. All three took 40-60 secs.

Added Traefik and Portainer and set up the domain.

First deploy with the changed URL in project settings took 40-60 sec aswell.

This is where it usually breaks but I did two more deploys and both 40-60 sec as well.

So this way seems to work fine for me.

Not sure if there is a bug with the new system or if it’s just something with me. I would prefer to use the new system, so if there is any extra info or testing you need me to do let me know.

Can you zip and send in private message the docker_compose.yml files generated in the new resource manager and the old docker machine.

The resource manager ones are located in:
in your project folder:
.wappler/providers/digitalocean/servers/server_name/wappler-compose/docker-compose.yml

Easy to be accessed from:

image

And the Docker Machine ones are in:
in your users folder:
~/.docker/machine/machines/server_name/wappler-compose/docker-compose.yml

Also add the project deploy target own docker-compose located in:

.wappler/targets/target_name/docker-compose.yml

Thanks!

Ok found the problem… seems at Digital Ocean with the very small servers of $4, you have very little memory and when running and web server and Traefik more memory is required otherwise indeed npm install takes for ever due to very limited resources.

There is also no swap file defined. Having a swap file helps to bypass the memory problem.

If you follow this guide and define one, you should see much faster deployments:

1 Like

Maybe it’s useful when adding services to a project to inform about requirements.