• HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    Menu
    • HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    Get in touch
    Get in touch
    Menu
    • HOME
    • PRODUCT
    • PRICING
    • ABOUT
    • COMMUNITY
    • Sign in
    • Start free trial
    • Get in touch
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    • Documentation
      • Home
      • Read API
      • Write API
      • Plugin Development
    1. Home
    2. asamolion
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 12
    • Best 1
    • Controversial 0
    • Groups 2

    Posts made by asamolion

    • RE: Render failed for template: templateFunction is not a function

      If you can point me to the commits that would be more than enough. I'm running a heavily customized version of NodeBB so I can't update directly to the latest version.

      However, I can push the commits for the fix to my fork.

      posted in Technical Support
      asamolion
      asamolion
    • RE: Render failed for template: templateFunction is not a function

      @PitaJ I've tried rebuilding it multiple times. The error pops up in the logs once the active users reach a high number, around 3000+ in my case.

      posted in Technical Support
      asamolion
      asamolion
    • Render failed for template: templateFunction is not a function

      I'm running NodeBB 1.5.3 on AWS and I keep getting this error in the logs

      Render failed for template /edx/app/community/nodebb-platform/build/public/templates/footer.jst:
       TypeError: Render failed for template /edx/app/community/nodebb-platform/build/public/templates/footer.jst:
       templateFunction is not a function
          at runtime (/edx/app/community/nodebb-platform/node_modules/benchpressjs/build/lib/runtime.js:64:16)
          at render (/edx/app/community/nodebb-platform/node_modules/benchpressjs/build/lib/express.js:11:20)
          at Object.__express (/edx/app/community/nodebb-platform/node_modules/benchpressjs/build/lib/express.js:33:5)
          at /edx/app/community/nodebb-platform/src/webserver.js:134:15
          at /edx/app/community/nodebb-platform/src/middleware/index.js:205:12
          at nextTask (/edx/app/community/nodebb-platform/node_modules/async/dist/async.js:5297:14)
          at next (/edx/app/community/nodebb-platform/node_modules/async/dist/async.js:5304:9)
          at /edx/app/community/nodebb-platform/node_modules/async/dist/async.js:906:16
          at /edx/app/community/nodebb-platform/src/file.js:101:3
          at FSReqWrap.oncomplete (fs.js:153:5)
      
      

      Can someone please tell me whey this occurs?

      This occurs on one of the servers in a load balanced environment where there are 2 servers running. If I increase the server count to 4 then out of those 4, 2 servers are having this exception. Servers in our load balanced environment are using redis for pub/sub, MongoDB as the primary database. Sticky sessions are enabled with stickiness time set to 30 seconds. The servers use the same AMI image.

      posted in Technical Support
      asamolion
      asamolion
    • Flooding and rate limiting socket connections?

      I've seen that there is a file called ratelimit.js in which NodeBB limits the number of connections that can be simultaneously connected to the app. When this limit is crossed, it disconnects users from the socket connections.

      var allowedCalls = 100;
      var timeframe = 10000;
      
      if (socket.callsPerSecond > allowedCalls && socket.elapsedTime < timeframe) {
          winston.warn('Flooding detected! Calls : ' + socket.callsPerSecond + ', Duration : ' + socket.elapsedTime);
          return true;
      }
      

      Why is this necessary? Is it not possible to connect as many users as our server can handle and scale using load balancers etc?.

      Why is this setting hard coded into the application?

      P.S. I'm using NodeBB v1.5.3.

      posted in NodeBB Development
      asamolion
      asamolion
    • Where do I select the group icon to show on my profile?

      I'm a member of two groups, Gamers and GNU/Linux users.

      Currenlty Gamers shows as a badge next to my profile. How can I change this to GNU/Linux?

      posted in General Discussion
      asamolion
      asamolion
    • RE: How to unit test plugins during developoment?

      @yariplus Yes, integration testing especially. Is there any resource on how to do it with NodeBB and its plugins?

      posted in NodeBB Development
      asamolion
      asamolion
    • How to unit test plugins during developoment?

      If I'm developing a plugin for NodeBB, what is the recommended way to write unit tests for the plugin?

      Has anyone done this who would like to share his workflow?

      posted in NodeBB Development
      asamolion
      asamolion
    • RE: How to disable watching all categories by default?

      So if I wanted to disable it, I would have to write a custom plugin or something?

      posted in Technical Support
      asamolion
      asamolion
    • How to disable watching all categories by default?

      I see that all categories are watched by default on NodeBB. Is there a way to disable this setting such that I only get notifications for the categories I watch myself.

      posted in Technical Support
      asamolion
      asamolion
    • RE: NodeBB libraries not accessible in plugin?

      @pitaj Thanks! That worked!

      Do you think the docs should be updated to include that?

      posted in Plugin Development
      asamolion
      asamolion
    • NodeBB libraries not accessible in plugin?

      I'm trying to follow the basic tutorial on writing nodebb plugins.

      Writing a Plugin

      But I'm using module.parent.require('./database') in my plugin but it isn't working.

      It simply says:
      Error: Cannot find module './database'

      Can anyone point me to the issue?

      posted in Plugin Development
      asamolion
      asamolion

    Get Started

    • Product
    • Pricing

    Resources

    • Demo Site
    • Answers
    • Docs
    • Bug Bounty

    Company

    • About
    • Blog
    • Contact
    Start Free Trial
    Github Facebook Instagram Twitter
    © 2014 – 2022 NodeBB, Inc. — Made in Canada.
    • Terms
    • Privacy
    • GDPR
    • DMCA
    • Contact
    Menu
    • Terms
    • Privacy
    • GDPR
    • DMCA
    • Contact