• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.1 Latest
Buy Hosting

Render failed for template: templateFunction is not a function

Scheduled Pinned Locked Moved Technical Support
6 Posts 2 Posters 855 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • asamolionA Offline
    asamolionA Offline
    asamolion Gamers
    wrote on last edited by asamolion
    #1

    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.

    1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    wrote on last edited by
    #2

    Run ./nodebb build, restart, and try again.

    1 Reply Last reply
    0
  • asamolionA Offline
    asamolionA Offline
    asamolion Gamers
    wrote on last edited by
    #3

    @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.

    1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    wrote on last edited by
    #4

    Oh, you're on an old version of NodeBB. This is fixed in the latest version, you should really try updating. I can't help you otherwise than point you to the commits which fix the issue.

    1 Reply Last reply
    0
  • asamolionA Offline
    asamolionA Offline
    asamolion Gamers
    wrote on last edited by
    #5

    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.

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to asamolion on last edited by
    #6

    @asamolion Here are the changes:

    https://github.com/NodeBB/NodeBB/pull/6649/files

    Just use the latest version of benchpressjs (not 1.2.3)

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development