Slow page loading on DigitalOcean
-
There's got to be something else going on. This is not normal by any means. Have you tried starting over? What guide did you use?
BTW, because of how templates are done now, your first request to any page will be slow, but subsequent requests should be fast.
-
Thanks for fast answer. Yeap, first loading I understood will be quite slow - but in my case it decrease only to 1 sec for loading other pages after loading main and I can't understand why( theme persona. nodebb version 1.5.3. plugins - standart - with https://github.com/Serhey/nodebb-plugin-featured-topics-extended-with-title https://github.com/Serhey/nodebb-plugin-ns-slugify-fixed-on-edit#readme https://github.com/Schamper/nodebb-plugin-poll#readme https://github.com/iiiyx/nodebb-plugin-share-vk https://github.com/boomzillawtf/nodebb-plugin-youtube-embed#readme
-
Nope - no improve performance. Specific - only facebook <!-- Facebook Pixel Code --> and VK pixel code in <head> and google analytics and yandex metrics <scripts> in global footer. but by the firebug - they loads near half a second - but main page and categories load slow.
-
the ultimate questions are...
what instance are you running? 1 vcore 1GB VM? bigger? smaller?
Do you have swap? in case you don't have enough memory...
is the DB on the same server as nginx and nodebb? separate?
Which OS are you running?
If these questions were answered, please point me to it, and I will see if I can help
-
which version of mongodb are you using?
-
If you go to the
/api
routes... e.g.http://yoursite.tld/api/recent
, is the rest still slow?Definitely seems like some mongo indices are missing though it could really be anyone's guess at this point.
You can re-create the indices by running this in MongoDB after
use
-ing your NodeBB database:db.objects.createIndex({ _key: 1, score: -1 }, { background: true }); db.objects.createIndex({ _key: 1, value: -1 }, { background: true, unique: true, sparse: true }); db.objects.createIndex({ expireAt: 1 }, { expireAfterSeconds: 0, background: true });
-
@julian said in Slow page loading on DigitalOcean:
If you go to the
/api
routes... e.g.http://yoursite.tld/api/recent
, is the rest still slow?Definitely seems like some mongo indices are missing though it could really be anyone's guess at this point.
You can re-create the indices by running this in MongoDB after
use
-ing your NodeBB database:db.objects.createIndex({ _key: 1, score: -1 }, { background: true }); db.objects.createIndex({ _key: 1, value: -1 }, { background: true, unique: true, sparse: true }); db.objects.createIndex({ expireAt: 1 }, { expireAfterSeconds: 0, background: true });
Thanks a lot! Now it works like a car on f1!)
-
@dread said in Slow page loading on DigitalOcean:
GitHub - Serhey/nodebb-plugin-featured-topics-extended-with-title: Custom news with title - forked from https://github.com/yariplus/nodebb-plugin-featured-topics-extended
Custom news with title - forked from https://github.com/yariplus/nodebb-plugin-featured-topics-extended - Serhey/nodebb-plugin-featured-topics-extended-with-title
GitHub (github.com)
Oh.
That is a very ... unorthodox ... way of forking my plugin.
-
@yariplus said in Slow page loading on DigitalOcean:
@dread said in Slow page loading on DigitalOcean:
GitHub - Serhey/nodebb-plugin-featured-topics-extended-with-title: Custom news with title - forked from https://github.com/yariplus/nodebb-plugin-featured-topics-extended
Custom news with title - forked from https://github.com/yariplus/nodebb-plugin-featured-topics-extended - Serhey/nodebb-plugin-featured-topics-extended-with-title
GitHub (github.com)
Oh.
That is a very ... unorthodox ... way of forking my plugin.
Sorry - I just start to using github. I foget to write fork. Fixed.