Without doing more in-depth analysis, this could be one of two things:
If a method doesn’t complete in its timeout window, the client will retry the call. If that’s happening, I would expect other weirdness than just hanging, but it’s a possibility. You could replace Meteor.call with Meteor.apply and set the noRetry option to prevent this.
You may be running out of memory. You could monitor the node process while it’s processing the method to check. On linux, use top and watch the %MEM column.
I ran a test again with 889 URLs. Before I invoked the server method, the two node processes were 374888k and 67852K. This time the process ran for about 28 minutes and all URLs were processed. The two node processes ended around 383, 784k and 53, 780k. During the process, the figures remained stable around 3.8 and .55.
I will be running few more tests and keep a vigil on numbers.
I am running my app on localhost server. Is this one of the prime reasons for my app taking so long to process things?
My app is now running all the way through, however, it’s taking a bit longer to finish. I guess that’s because of localhost server.
I am trying to deploy my app on a digital ocean server using Meteor Up w/o success. I am completely new to server deployment process. Is there any other/easy way to deploy my app on server?
In my experience, for most start-up deployment, localhost is usually quicker, because you have more CPU threads and memory than you do in a small, cloud container. However, your code is doing lots of sequential HTTP calls, and depending on your location and infrastructure, that may skew the performance. You could look at batching the calls
to run multiple, concurrent requests, if you find it’s taking too long.
The easiest way to deploy a Meteor app is to use Galaxy - Meteor’s own hosting platform. However, it probably will work out more expensive than using mup, even with MongoDB hosting on an Atlas free tier.
module.exports = {
servers: {
one: {
// TODO: set host address, username, and authentication method
host: '104.236.118.62',
username: 'root',
pem: './amit@amit.pem'
// password: 'server-password'
// or neither for authenticate from ssh-agent
}
},
app: {
// TODO: change app name and path
name: 'StaticHTMLGenerator',
path: '../',
servers: {
one: {},
},
buildOptions: {
serverOnly: true,
},
env: {
// TODO: Change to your app's url
// If you are using ssl, it needs to start with https://
ROOT_URL: 'http://statichtmlgenerator.com',
MONGO_URL: 'mongodb://localhost/meteor',
},
// ssl: { // (optional)
// // Enables let's encrypt (optional)
// autogenerate: {
// email: 'email.address@domain.com',
// // comma separated list of domains
// domains: 'website.com,www.website.com'
// }
// },
docker: {
// change to 'abernix/meteord:base' if your app is using Meteor 1.4 - 1.5
image: 'abernix/meteord:base',
},
// Show progress bar while uploading bundle to server
// You might need to disable it on CI servers
enableUploadProgressBar: true
},
mongo: {
version: '3.4.1',
servers: {
one: {}
}
}
};
And when I run mup.cmd setup command, I get the following error in cmd:
Started TaskList: Setup Docker
[104.236.118.62] - Setup Docker
sudo: docker: command not found
sudo: docker: command not found
Major
Minor
Hit:1 http://mirrors.digitalocean.com/ubuntu xenial InRelease
Hit:2 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease
Hit:3 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:5 https://download.docker.com/linux/ubuntu xenial InRelease
Fetched 102 kB in 0s (141 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
iptables is already the newest version (1.6.0-2ubuntu3).
curl is already the newest version (7.47.0-1ubuntu2.5).
lxc is already the newest version (2.0.8-0ubuntu1~16.04.2).
wget is already the newest version (1.17.1-1ubuntu1.3).
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-101 linux-headers-4.4.0-101-generic
linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic
linux-headers-4.4.0-104 linux-headers-4.4.0-104-generic
linux-headers-4.4.0-108 linux-headers-4.4.0-108-generic
linux-headers-4.4.0-93 linux-headers-4.4.0-93-generic linux-headers-4.4.0-96
linux-headers-4.4.0-96-generic linux-headers-4.4.0-97
linux-headers-4.4.0-97-generic linux-image-4.4.0-101-generic
linux-image-4.4.0-103-generic linux-image-4.4.0-104-generic
linux-image-4.4.0-108-generic linux-image-4.4.0-93-generic
linux-image-4.4.0-96-generic linux-image-4.4.0-97-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 57 not upgraded.
1 not fully installed or removed.
Need to get 0 B/34.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package libseccomp2:amd64 (--configure):
package libseccomp2:amd64 is not ready for configuration
cannot configure (current status 'half-installed')
Errors were encountered while processing:
libseccomp2:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
[104.236.118.62] x Setup Docker: FAILED
-----------------------------------STDERR-----------------------------------
sudo: docker: command not found
sudo: docker: command not found
E: Sub-process /usr/bin/dpkg returned an error code (1)
-----------------------------------STDOUT-----------------------------------
rs-4.4.0-103-generic
linux-headers-4.4.0-104 linux-headers-4.4.0-104-generic
linux-headers-4.4.0-108 linux-headers-4.4.0-108-generic
linux-headers-4.4.0-93 linux-headers-4.4.0-93-generic linux-headers-4.4.0-96
linux-headers-4.4.0-96-generic linux-headers-4.4.0-97
linux-headers-4.4.0-97-generic linux-image-4.4.0-101-generic
linux-image-4.4.0-103-generic linux-image-4.4.0-104-generic
linux-image-4.4.0-108-generic linux-image-4.4.0-93-generic
linux-image-4.4.0-96-generic linux-image-4.4.0-97-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 57 not upgraded.
1 not fully installed or removed.
Need to get 0 B/34.1 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package libseccomp2:amd64 (--configure):
package libseccomp2:amd64 is not ready for configuration
cannot configure (current status 'half-installed')
Errors were encountered while processing:
libseccomp2:amd64
----------------------------------------------------------------------------